I have a table named Tasks as shown below. Fields in the table are employees, tasks, and date.
Input table :
Date: employees Task
2016-12-03 John Paint the walls pink
2016-12-03 Sam Play hockey on linoleum
2016-12-03 John the golden fish in a bucket
2016-12-03 Sam Create a rink on the porch
2016-12-03 Nathan Glue the front door
2016-12-03 Nathan Paint the walls pink
2016-12-08 Sam Melt the doorknob
2016-12-08 Dewey Wrap the cat in toilet paper
2016-12-08 John Give bubble gum to the dog
2016-12-08 Dewey Order 20 pizzas
2016-12-09 John Create a rink on the porch
2016-12-09 Nathan Eat all the candies
.......
...... so on
For Output, I want to select a list which would be sorted according to date first and then according to specific Order of employee (John come first, Nathan second, sam Third, Dewey fourth).
Output:
Date: employees Task
2016-12-03 John Paint the walls pink
2016-12-03 John the golden fish in a bucket
2016-12-03 sam Play hockey on linoleum
2016-12-03 Sam Create a rink on the porch
2016-12-03 Nathan Glue the front door
..
..
.... so on.
I tried using ORDER BY. How can I get the Sorting done in the specific sequence as mentioned above? Or do I need to know some other concept? Any help would be appreciated.
ORDER BY FIELD