SQL subquery with COUNT help

前端 未结 4 1731
挽巷
挽巷 2021-02-01 13:41

I have an SQL statement that works

SELECT * FROM eventsTable WHERE columnName=\'Business\'

I want to add this as a subquery...

         


        
4条回答
  •  旧巷少年郎
    2021-02-01 14:12

    Do you want to get the number of rows?

    SELECT columnName, COUNT(*) AS row_count
    FROM eventsTable
    WHERE columnName = 'Business'
    GROUP BY columnName
    

提交回复
热议问题