barbaro!!!
aunque no probe los otros.
este me sirvio de maravilla.
Código SQL
[-]
select top 1
(select count(*) from b_reviews where rating = 0) as Rating0,
(select count(*) from b_reviews where rating = 1) as Rating1,
(select count(*) from b_reviews where rating = 2) as Rating2,
(select count(*) from b_reviews where rating = 3) as Rating3,
(select count(*) from b_reviews where rating = 4) as Rating4,
(select count(*) from b_reviews where rating = 5) as Rating5
from b_reviews group by Rating
yapt... gracias este tambien sirvio:
Código SQL
[-]
SELECT
DISTINCT(ProfessionalID)
,COUNT(CASE Rating WHEN 1 THEN 1 ELSE NULL END) AS estrellasDe1
,COUNT(CASE Rating WHEN 2 THEN 1 ELSE NULL END) AS estrellasDe2
,COUNT(CASE Rating WHEN 3 THEN 1 ELSE NULL END) AS estrellasDe3
,COUNT(CASE Rating WHEN 4 THEN 1 ELSE NULL END) AS estrellasDe4
,COUNT(CASE Rating WHEN 5 THEN 1 ELSE NULL END) AS estrellasDe5
FROM b_reviews
GROUP BY
professionalid
son unos genios, gracias a todos,
saludos miles.