I am currently learning Structured Query Language. I desided to make a simple database to hold Mega Millions Lottery Results and than perform various queries on the database to help me choose the winning numbes. I understand the odds, i am only doing this as an execerise.
My Database table has 8 elements.
Primary Key = Date, FirstNum, SecondNum, ThirdNum, ForthNum, FifthNum, SixthNum and PayoutAmount.
I have already peformed a couple simple select statments.
My first statement, give me a list of all the number that were selected first and number of times the number was select first.
SELECT big.First, Count(First)
FROM big
GROUP BY big.First
ORDER BY big.First;

results
FirstNum, Count
1 4
2 3
4 4
5 8
6 10
7 11
8 45
etc. etc.


I now want find a way to perform a similar action across the first 5 fields ie. FirstNum, SecondNum, ThirdNum, ForthNum and FifthNum