Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatio Temporal Database Management International Workshop Stdbm 99 Edinburgh Scotland September 10 11 1999 Proceedings Lncs 1678

Authors: Michael H. Bohlen ,Christian S. Jensen ,Michel O. Scholl

1999th Edition

3540664017, 978-3540664017

More Books

Students also viewed these Databases questions