Suppose you have a table in SQL:
Prices
------
13.99
14.00
52.00
52.00
52.00
13.99
How would you count the amount of times a DIFFERENT field has been entered in? Therefore an example of such a count would output:
13.99 - 2 times.
14.00 - 1 times.
52.00 - 3 times.
OR perhaps:
3 (i.e. 13.99, 14.00, 52.00)
Can anyone advise? Cheers.
How about:
SELECT Prices, COUNT(*) FROM TheTable GROUP BY Prices
Can't say I've tried it on MySql, but I'd expect it to work...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With