Question: Application: BasicSQL ( Select & Where ) - Customers Customer fields in Customer table are listed as in the following: customer _ id [ int

Application: BasicSQL (Select & Where)- Customers
Customer fields in Customer table are listed as in the following:
customer_id[int]
first_name[varchar(100)]
last_name[varchar(100)]
age[int]
country[varchar(100)]
The result of "Select * from Customers" command is as follows:
Customers
\table[[customer_id,first_name,last_name,age,country],[1,John,Doe,31,USA],[2,Robert,Luna,22,USA],[3,David,Robinson,22,UK],[4,John,Reinhardt,25,UK],[5,Betty,Doe,28,UAE]]
Based on this table write the SQL statements for the given requests
Request: List the firstname and lastname of the customers
Request: List customers whose last name is "Doe"
Request: List the names and ages of customers who are from the UK
Request: List customers older than 25
Request: List the customer with customer ID 3
Request: List customers whose first name is "John"
Request: List customers who are 22 years old and from the UK
Request: List customers younger than 25
Request: List customers whose first name is not "David"
Request: List customers older than 30 and from the USA
Request: List customers whose last name is "Luna" or "Doe"
Request: List customers whose age is between 22 and 30
Request: List customers whose first name is "John" and are from countries other than the USA
Request: List customers whose first name starts with the letter "J"
Request: List customers whose last name ends with "oe"
Request: List customers whose first name contains "ohn"
Request: List customers whose second letter in their first name is "o"
Request: List customers whose last name does not contain the letter "a"
Request: List customers whose first name starts with "B" and has 5 characters
Request: List customers who have a missing (NULL) last name
Request: List customers whose age is known (NOT NULL)
Request: List customers whose last name is "Doe", older than 30, and whose age is known (NOT NULL)
Application: BasicSQL ( Select & Where ) -

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 Programming Questions!