Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9091

Re: How to create a view with a column of counts of the occurence of values

$
0
0

How about

 

CREATE VIEW myview as

     SELECT id, count(*) as "COUNT"

     FROM mytable

     GROUP BY id;

 

?

 

- Lars


Viewing all articles
Browse latest Browse all 9091


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>