In this tutorial, you learned how to filter returned data using the SELECT statement's WHERE clause. You learned how to test for equality, nonequality, greater than and less than, value ranges
mysql tutorial for beginners with examples
mysql database tutorial
http://sqlfiddle.com/#!9/645cf3/1