Practice Logical Operator with Chinook
Practice Logical Operator with Chinook Data Science Project
Advanced SQL

Practice Logical Operator with Chinook

In this project, you will engage with a music store database, focusing on the application of logical operators in SQL. You’ll gain hands-on experience in crafting queries that assess various conditions. By completing practical exercises, you'll develop your skills in selecting data based on specific criteria, ultimately enabling you to perform insightful analyses and identify meaningful patterns within the dataset.
Start this project
Practice Logical Operator with ChinookPractice Logical Operator with Chinook
Project Created by

Vidhi Shah

Project Activities

All our Data Science projects include bite-sized activities to test your knowledge and practice in an environment with constant feedback.

All our activities include solutions with explanations on how they work and why we chose them.

codevalidated

Find Albums with Medium-Length Titles

Retrieve the titles of albums from the Album table that have a title length greater than 30 characters and less than 40 characters.

codevalidated

Identify Customers without Company or Fax Information

Select all details of customers from the Customer table who do not have a company name and do not provide a fax number.

codevalidated

Find Customers from Brazil or Portugal without Fax Information

Retrieve all details of customers from the Customer table who are located in either Brazil or Portugal and do not have a fax number listed.

multiplechoice

What will this query retrieve?

SELECT * FROM Track WHERE (MediaType = 'Audio' OR MediaType = 'Video') AND NOT (Genre = 'Pop');
codevalidated

Identify Customers with Short Last Names Outside the USA

Select the CustomerId of customers from the Customer table whose last names are 6 characters or shorter and who are not located in the USA.

multiplechoice

What will be the result if the customer table has no records meeting a given condition?

codevalidated

Odd and Even ones

Retrieve all details from the InvoiceLine table where either the InvoiceId or the TrackId is even, but not both.

codevalidated

Identify Customers in Billing Cities with Specific Invoice Criteria

Select the CustomerId and BillingCity from the Invoice table for customers whose IDs are even and less than 30, and whose total invoice amount exceeds $5.00.

codevalidated

Identify Invoices with Missing Address Information and a Low Total

Retrieve all details from the Invoice table where any of the billing address fields (BillingCity, BillingState, BillingCountry, BillingPostalCode) are NULL, and where the total amount of the invoice is less than $1.00.

codevalidated

Find all tracks that are potentially epics

Find all tracks from Track table that are longer than 6 minutes (360000 milliseconds) and have a file size larger than 7 MB (7000000 bytes), but excluding any tracks from GenreId 1 and where the AlbumId is not null.

codevalidated

Tracks with filler content

Identify tracks that might be shorter than 2 minutes or have no composer listed, but still priced at the standard 0.99.

codevalidated

Identify Employees Based on Certain Conditions

Write a query to retrieve the following information:

  • Select the columns: EmployeeId, FirstName, LastName, and Email from Employee table.
  • Apply the following filtering criteria:
    • Include employees who hold the title 'Manager' and were hired before January 1, 2003.
    • OR include employees who do not hold the title 'Manager', were hired on or after January 1, 2003, and were born before January 1, 1970.
  • Ensure that:
    • The employee's BirthDate is after January 1, 1960.
    • The employee's City is not 'Calgary'.
    • The employee's Email does not end with @gmail.com.
  • Order the results by BirthDate in ascending order.
Practice Logical Operator with ChinookPractice Logical Operator with Chinook
Project Created by

Vidhi Shah

As a Project Author at DataWars, I dive into the world of data science and AI/ML with a millennial flair, constantly intrigued by the inner workings of technology. While I'm not crunching numbers, you'll find me cheering for my favorite cricket team.

As a Project Author at DataWars, I dive into the world of data science and AI/ML with a millennial flair, constantly intrigued by the inner workings of technology. While I'm not crunching numbers, you'll find me cheering for my favorite cricket team.

This project is part of

Advanced SQL

Explore other projects