Question: (Writing SQL queries) The local bar, Petes Bar, maintains a database with the following tables, Customers (Email, Name, Age) Beers (ID, Name, Time, Brewery, Price)

(Writing SQL queries)

The local bar, Petes Bar, maintains a database with the following tables,

Customers (Email, Name, Age)

Beers (ID, Name, Time, Brewery, Price)

Orders (Email, ID, Date)

Answer the following queries in SQL.

1. What is the full name of the customer with email = adam@mail.com;

2. Which beers (names of the beers) cost less than 4.00;

3. Find all the beers whose name ends with lager;

4. Which beers did the customer, whose email is adam@mail.com, order in September 2017 (Assume that the attribute date is a number represented as YYYYMMDD withe property that later dates will always have a larger value than earlier dates.);

5. List the number of distinct beers ordered by the customer, whose email address is adam@mail.com.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!