最代码
sd744713350的gravatar头像
sd7447133502018-05-09 21:50:47

sql语句如何实现如下的条件查询需求

求解sql语句

sql语句如何实现如下的条件查询需求

所有回答列表(2)
sunjiyun26的gravatar头像
sunjiyun26 LV85月14日

这么多问题,3个牛币

娱乐人的gravatar头像
娱乐人 LV25月17日

SELECT SUM(Account) 
FROM account
WHERE State='00'

SELECT COUNT(property) 
FROM custinfo
WHERE Property = '2'

SELECT * 
FROM custinfo ,account 
WHERE custinfo.`CustId`=account.`CustId` AND Property='1' AND State='00'

SELECT SUM(Account)
FROM custinfo,account
WHERE custinfo.`CustId`=account.`CustId`
GROUP BY property

SELECT *
FROM custinfo,account
WHERE custinfo.`CustId`=account.`CustId`
GROUP BY property

SELECT custinfo.`CustId`,account.`CustName`,SUM(Account)
FROM custinfo,account
WHERE custinfo.`CustId`=account.`CustId` AND custinfo.`Property`='1' 
GROUP BY custinfo.`CustId`
HAVING SUM(Account)>5000000

顶部客服微信二维码底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友