zoukankan      html  css  js  c++  java
  • Mysql存储

    BEGIN
    # 统计视频使用的模板数
    UPDATE VideoTemplate vt
    INNER JOIN (
    SELECT
    TemplateId,
    COUNT(TemplateId) AS TotalCount
    FROM
    VideoWorks
    WHERE
    Type = 1
    GROUP BY
    TemplateId
    ) work_total_count
    ON vt.Id = work_total_count.TemplateId
    SET vt.RenderTotalCount = work_total_count.TotalCount;
    END

    -----------------------------------------------------------------------------------------------------------

    BEGIN
    # 统计合成使用的背景音,主播,文本范例的数量
    UPDATE VideoBgm vb
    INNER JOIN (
    SELECT
    BgmId,
    COUNT(BgmId) AS TotalCount
    FROM
    VideoWorks
    WHERE
    Type = 1
    GROUP BY
    BgmId
    ) work_total_count
    ON vb.Id = work_total_count.BgmId
    SET vb.UseCount = work_total_count.TotalCount;

    UPDATE VideoTextExample vte
    INNER JOIN (
    SELECT
    TextExampleId,
    COUNT(TextExampleId) AS TotalCount
    FROM
    VideoWorks
    WHERE
    Type = 1
    GROUP BY
    TextExampleId
    ) work_total_count
    ON vte.Id = work_total_count.TextExampleId
    SET vte.UseCount = work_total_count.TotalCount;

    UPDATE ChannelAndSpeaker s
    INNER JOIN (
    SELECT
    SpeakerId,
    COUNT(SpeakerId) AS TotalCount
    FROM
    VideoWorks
    WHERE
    Type = 1
    GROUP BY
    SpeakerId
    ) work_total_count
    ON s.No = work_total_count.SpeakerId
    SET s.UseCount = work_total_count.TotalCount;
    END

  • 相关阅读:
    Vue 项目中 ESlint 配置
    ajax、axios、fetch 对比
    vue 中 axios 使用
    NodeJS 多版本管理(NVM)
    axio 请求中参数是数组
    Python 图片文字识别
    .NET 使用 VLC 播放视频
    Python 常见问题
    SpringBoot(4) SpringBoot热部署
    SpringBoot(3) 文件上传和访问
  • 原文地址:https://www.cnblogs.com/qpf20190212/p/10402244.html
Copyright © 2011-2022 走看看