Problem: For fun I am building a Database for lottery results to get some statistics off of. As of now I am only interested in a Pick 3 style lotto and might introduce more later. How would you approach a query to produce the desired result below? Would there be a better table design? ## Data ## +----------------------------------------------+ | Date | Time | NumOne | NumTwo | NumThree | +----------------------------------------------+ | 01/02/14 | M | 8 | 2 | 1 | | 01/02/14 | E | 8 | 8 | 8 | | 01/03/14 | M | 1 | 9 | 4 | | 01/04/14 | E | 0 | 7 | 5 | +----------------------------------------------+ ## Desired Result ## +----------------+ | Number | Count | +----------------+ | 0 | 1 | | 1 | 2 | | 2 | 1 | | 3 | 0 | | 4 | 1 | | 5 | 1 | | 6 | 0 | | 7 | 1 | | 8 | 4 | | 9 | 1 | +----------------+