I used COUNTIF
on SQL Server to COUNT
a particular value with condition but it brought out an error.
SELECT
total rounds, total member, total customer,
ROUND(total rounds/total member, 2) * 100 AS memberper
FROM
(SELECT
COUNT(rideid) total rounds
COUNTIF(member_customer = 'member') AS total member,
COUNTIF(member_customer = 'customer') AS total customer
FROM
Data)
1条答案
按热度按时间1zmg4dgp1#
add comma
Example COUNTIF in SQL
Recheck column name total rounds, total member, total customer
You need to double-check all of the SQL queries again.