From the course: SQL Essential Training

Unlock the full course today

Join today to access over 23,100 courses taught by industry experts.

Filter and analyze numeric data

Filter and analyze numeric data - SQL Tutorial

From the course: SQL Essential Training

Filter and analyze numeric data

- [Instructor] Here's the scenario. Management at WSDA Music has asked, how many customers purchased two songs at 99 cents each? Well, if we zero in on this question, how many customers purchased two songs at 99 cents each, and when a customer purchases a track, that generates a transaction in the invoices table. So let's go over to the Browse Data tab and start by taking a look at the track table. Now, if we look over at the UnitPrice field, we do see that there are tracks at 99 cents each, which is part of our question, how many customers purchased two songs at 99 cents each? Now, two songs purchased at 99 cents each will total to $1.98. So let's take a look at our invoice table and if we scroll over to the total, we do see that there are invoices totaling $1.98. So to respond to this question, we would need to present all of the records in the invoice table that total $1.98. How would we achieve this with SQL? Well…

Contents