Configure MySQL and Write some SQL queries

Configure your DB

Create the following tables
  • category
  • article (containing a categoryID)
Fill data in these two tables (it should be somehow consistant).

Request for data

For this part, you should not use phpMyAdmin functionalities, you should only use the SQL interface in this program.
  • Write a SQL query for accessing all the elements in the table article.
  • Write a query for displaying the name and the price of all articles and sort them with price (descending)
  • Write a query for displaying for each article the name and its category name (from the other table).
  • For each category, display the smallest price, and the number of elements
  • For each category, display an article having the smallest price
The solution