Structured Query Language
Querying The Database

Now that you have a table full of data, it's time to do some queries. The only main difference between the types of SELECT query that you have done with Access and those you do in MySQL is the format for LIKE clauses. In MySQL, the wildcard character is %. If you are unsure how to do this, choose the Query By Design option in PHPMyAdmin. PHPMyAdmin helpfully shows the SQL for any of the operations that you perform through the software.

Create SQL SELECT queries to do the following,

  1. Which of the seeds cost less than £15?
  2. Which of the seeds costing under £15 have more than 200 seeds per gram?
  3. Which of the seeds can be planted in open ground?
  4. Which of the seeds produce flowers in January, February or March?
  5. Which of the seeds need to be planted in April and cost less than £10?
  6. Which of the seeds produce plants with blue flowers?
  7. Which of the seeds produce plants with green leaves?
  8. Which of the seeds produce plants with dark green leaves?
  9. Which of the seeds produce hardy plants?
  10. Which of the plants are annual?
  11. Which of the plants are perennial?
  12. Produce a list of unique seed types in the table.