How many tickets were sold on Saturday, and how much money did they bring in?
3 lessons, about 1 h 15 min3 simulations10 problems3 practice questionsPython in every lesson
A query can give one number instead of a list: how many records pass, or the total of a field. COUNT counts the records and SUM adds up a numeric field. You use both with and without WHERE and work out the single value a script outputs.
Real questions often have two conditions: Saturday sales of evening shows, or members who are under 12 or over 65. AND needs both conditions to be true, OR needs at least one. You join conditions, find a range with AND, and count and add the records that pass.
In the examination you read a script and give its exact output, complete a script that has gaps, and find and correct the errors in a script. This lesson gives you a method for each task and practises it on the Tickets table.
Log in to join the discussion.
Loading…