SQL subquery with COUNT help -
i have sql statement works
select * eventstable columnname='business'
i want add subquery...
count(business) row_count
how do this?
this easiest way, not prettiest though:
select *, (select count(*) eventstable columnname = 'business') rowcount eventstable columnname = 'business'
this work without having use group by
select *, count(*) on () rowcount eventstables columnname = 'business'
Comments
Post a Comment