Answered by maryam-bibi

SELECT 
    gender, 
    ethnicity, 
    COUNT(*) AS num_senators
FROM 
    us_senate
GROUP BY 
    gender, 
    ethnicity
ORDER BY 
    num_senators DESC;

Answered by jonalexander

select gender, ethnicity, count(1) as num_senators from us_senate group by 1, 2 order by 3 desc;

Answered by gurneet kaur

select gender, ethnicity, count(1) as num_senators from us_senate group by 1, 2 order by 3 desc;

Answered by charlie1404

select gender, ethnicity, count(1) as num_senators from us_senate group by 1, 2 order by 3 desc;

Answered by retr0sushi.04

select gender, ethnicity
from us_senate
group by gender, ethnicity
;

Answered by Pfwd44

select gender, ethnicity
from us_senate
group by gender, ethnicity
;

Answered by aklagoo@gmail.com

select gender, ethnicity, count(*) as num_senators from us_senate group by gender, ethnicity;

Answered by abhi

SELECT 
	gender, ethnicity, COUNT(*) AS num_senators FROM us_senate
GROUP BY gender, ethnicity
ORDER BY COUNT(*) DESC;

Answered by tien199013@hotmail.com

select us.gender, us.ethnicity, count(*) num_senators from us_senate us
group by us.gender, us.ethnicity
order by num_senators desc;

Answered by rotentor

SELECT COUNT(id) AS num_senators, gender, ethnicity
FROM us_senate
GROUP BY 2, 3
ORDER BY 1 DESC;

Answered by helix

select gender,
       ethnicity,
       count(id) as num_senators
 from us_senate
 group by gender,ethnicity
 order by num_senators desc;

Answered by anthony_calek

select gender,
       ethnicity,
       count(id) as num_senators
 from us_senate
 group by gender,ethnicity
 order by num_senators desc;

Answered by tymp

select gender,
       ethnicity,
       count(id) as num_senators
 from us_senate
 group by gender,ethnicity
 order by num_senators desc;

Answered by bocalettirocco

select gender,
       ethnicity,
       count(id) as num_senators
 from us_senate
 group by gender,ethnicity
 order by num_senators desc;

Answered by cyerrajodu

select gender,
       ethnicity,
       count(id) as num_senators
 from us_senate
 group by gender,ethnicity
 order by num_senators desc;

Answered by pamity

select gender, ethnicity, count(*) as num_senators 
from us_senate 
group by gender, ethnicity
order by num_senators desc;

Answered by trabi71

select gender,ethnicity, count(*) as num_senators
from us_senate 
group by gender, ethnicity
order by count(*) desc;

Answered by sbalema2

select gender,ethnicity, count(*) as num_senators
from us_senate 
group by gender, ethnicity
order by count(*) desc;

Answered by jengahguy

SELECT gender, ethnicity, COUNT(*) AS 'num_senators'
FROM us_senate
GROUP BY gender, ethnicity;

Answered by amkreiner

SELECT gender, ethnicity, COUNT(*) AS 'num_senators'
FROM us_senate
GROUP BY gender, ethnicity;

Answered by superhoops540

SELECT gender, ethnicity, COUNT(*) AS num_senators
FROM us_senate uss
GROUP BY gender, ethnicity
ORDER BY COUNT(*) DESC;

Answered by blep

SELECT gender, ethnicity, count(*) num_senators FROM us_senate GROUP BY gender, ethnicity;

Answered by sbw0125

select gender, ethnicity , count(*) as num_senators from us_senate 
group by gender, ethnicity;

Answered by diddyp20

select gender, ethnicity , count(*) as num_senators from us_senate 
group by gender, ethnicity;

Answered by parth

select gender, ethnicity, count(*) as num_senators 
	from us_senate group by gender, ethnicity
    order by num_senators desc;

Answered by anonymousUser

select gender, ethnicity, count(*) as num_senators 
	from us_senate group by gender, ethnicity
    order by num_senators desc;

Answered by jrz1977

select gender, ethnicity, count(*) as num_senators 
	from us_senate group by gender, ethnicity
    order by num_senators desc;