SQL多表查询

---------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多表查询

上一篇:ado.net的简单数据库操作(三)——简单增删改查的实际应用


下一篇:从新开始——Start Developing iOS Apps Today——从今天开始开发IOS(IOS7版)系列源文档翻译(一)