ANY dialect question:
select the most commonly repeated value from the table
write an SQL query to select the most commonly repeated value from the table below.
id values
1 1
2 2
3 1
4 3
5 1
6 2
I try this, but not work. Please help. thnaks
select a.* from test a,(
select value,count(value) as num from test
group by value)b where a.value=b.value
order by b.num desc
|