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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started