sql 恢复广告服务器原始SQL

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql 恢复广告服务器原始SQL相关的知识,希望对你有一定的参考价值。

#Show all active campaigns
SELECT * FROM `rv_campaigns` WHERE `activate_time` <= now() and expire_time >= now()

#show all past campaigns
SELECT * FROM `rv_campaigns` WHERE `activate_time` <= now() and expire_time <= now()

#show all upcoming campaigns
SELECT * FROM `rv_campaigns` WHERE `activate_time` >= now()

#show campaigns with clients (advertiser) information
SELECT * FROM `rv_campaigns`
LEFT JOIN rv_clients on rv_campaigns.clientid=rv_clients.clientid

#shows banners with campaigns and client (advertiser) information
SELECT * FROM `rv_banners`
LEFT JOIN rv_campaigns on rv_banners.campaignid=rv_campaigns.campaignid
LEFT JOIN rv_clients on rv_campaigns.clientid=rv_clients.clientid

#shows statistics with banners, campaigns and clients (Advertisers)
SELECT * FROM `rv_data_summary_ad_hourly`
LEFT JOIN rv_banners ON rv_data_summary_ad_hourly.ad_id=rv_banners.bannerid
LEFT JOIN rv_campaigns on rv_banners.campaignid=rv_campaigns.campaignid
LEFT JOIN rv_clients on rv_campaigns.clientid=rv_clients.clientid

#shows statistics with zones banners, campaigns and clients (Advertisers)
SELECT * FROM `rv_data_summary_ad_hourly`
LEFT JOIN rv_zones ON rv_data_summary_ad_hourly.zone_id=rv_zones.zoneid
LEFT JOIN rv_banners ON rv_data_summary_ad_hourly.ad_id=rv_banners.bannerid
LEFT JOIN rv_campaigns on rv_banners.campaignid=rv_campaigns.campaignid
LEFT JOIN rv_clients on rv_campaigns.clientid=rv_clients.clientid

以上是关于sql 恢复广告服务器原始SQL的主要内容,如果未能解决你的问题,请参考以下文章

SQL Server 2000 绿色版的软件特点

团队基础服务器 2012 恢复

用友金蝶SQL数据库误格式化恢复 SQL数据库修复 SQL数据库恢复 工具 方法

如何将数据库恢复到 Bluemix 中的 SQL 数据库服务?

SQL数据库可疑恢复 挂起恢复 置疑恢复 SQL数据库无法附加修复 附加报错 9003

sql server 一直显示恢复怎么解决