SELECT business.bussId,
(select count(invoices.userId) from invoice where invoice.userId = '3000')
as invoiceCount,
(select SUM(invoices.price) from invoice where invoice.userId = '3000')
as invoiceprice ,
FROM business WHERE business.bussId=100
我怎麼能拿使用發票價格和invoiceCount一個嵌套的選擇?
你可以把你的表嗎? – 2014-11-14 12:52:20