首页 > 数据库技术 > 详细

SQL多表查询

时间:2021-09-02 08:41:43      阅读:27      评论:0      收藏:0      [点我收藏+]

---------requirement start------------
Query user that subscription of product code PRMALLCHNNL that start at 26 - 30 AUGUST 2021.
Please provide the data following the format below (on TXT file):

Province, City Name, Usercode, UserStatus, SubscribeTime, Productcode, STB ID
-----------requirement end-----------


------------sql start----------------
select c.provname as Province, d.cityname as CityName, a.usercode as Usercode, a.status as UserStatus, b.createtime as SubscribeTime, b.productcode as Productcode, a.stbcode as STBID from s830_user a, s830_user_subs b, s830_province c, s830_city d where a.userid=b.userid and a.provcode=c.provcode and a.citycode=d.citycode and b.productcode=‘PRMALLCHNNL‘ and b.createtime>‘20210826000000‘ and b.createtime<‘20210830000000‘;

SQL多表查询

原文:https://www.cnblogs.com/zhonghaijing/p/15213381.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!