Question: Find the number of different cities that employees live in.

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

customer : city (text) , customerid (number) | employee : city (text) , employeeid (number)


Question: Find all invoice dates corresponding to customers with first name Astrid and last name Gruber.

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

invoice : invoicedate (time) , customerid (number) , invoiceid (number) | customer : customerid (number) , firstname (text) , lastname (text) , customerid (number) | employee : firstname (text) , lastname (text) , employeeid (number)


Question: What are the invoice dates for customers with the first name Astrid and the last name Gruber?

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

invoice : invoicedate (time) , customerid (number) , invoiceid (number) | customer : customerid (number) , firstname (text) , lastname (text) , customerid (number) | employee : firstname (text) , lastname (text) , employeeid (number)


Question: Find all the customer last names that do not have invoice totals larger than 20.

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

customer : lastname (text) , customerid (number) , customerid (number) | employee : lastname (text) , employeeid (number) | invoice : customerid (number) , total (number) , invoiceid (number)


Question: What are the last names of customers without invoice totals exceeding 20?

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

customer : lastname (text) , customerid (number) , customerid (number) | employee : lastname (text) , employeeid (number) | invoice : customerid (number) , total (number) , invoiceid (number)


Question: Find the first names of all customers that live in Brazil and have an invoice.

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

customer : firstname (text) , customerid (number) , country (text) , customerid (number) | employee : firstname (text) , country (text) , employeeid (number) | invoice : customerid (number) , invoiceid (number)


Question: What are the different first names for customers from Brazil who have also had an invoice?

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

customer : firstname (text) , customerid (number) , country (text) , customerid (number) | employee : firstname (text) , country (text) , employeeid (number) | invoice : customerid (number) , invoiceid (number)


Question: Find the address of all customers that live in Germany and have invoice.

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

customer : address (text) , customerid (number) , country (text) , customerid (number) | employee : address (text) , country (text) , employeeid (number) | invoice : customerid (number) , invoiceid (number)


Question: What are the addresses of customers living in Germany who have had an invoice?

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

customer : address (text) , customerid (number) , country (text) , customerid (number) | employee : address (text) , country (text) , employeeid (number) | invoice : customerid (number) , invoiceid (number)


Question: List the phone numbers of all employees.

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

customer : phone (text) , customerid (number) | employee : phone (text) , employeeid (number)


Question: What are the phone numbers for each employee?

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

customer : phone (text) , customerid (number) | employee : phone (text) , employeeid (number)


Question: How many tracks are in the AAC audio file media type?

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

mediatype : mediatypeid (number) , name (text) , mediatypeid (number) | track : mediatypeid (number) , name (text) , trackid (number) | artist : name (text) , artistid (number) | genre : name (text) , genreid (number) | playlist : name (text) , playlistid (number)


Question: Count the number of tracks that are of the media type "AAC audio file".

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

mediatype : mediatypeid (number) , name (text) , mediatypeid (number) | track : mediatypeid (number) , name (text) , trackid (number) | artist : name (text) , artistid (number) | genre : name (text) , genreid (number) | playlist : name (text) , playlistid (number)


Question: What is the average duration in milliseconds of tracks that belong to Latin or Pop genre?

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

track : milliseconds (number) , genreid (number) , name (text) , trackid (number) | genre : genreid (number) , name (text) , genreid (number) | artist : name (text) , artistid (number) | mediatype : name (text) , mediatypeid (number) | playlist : name (text) , playlistid (number)


Question: Find the average millisecond length of Latin and Pop tracks.

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

track : milliseconds (number) , genreid (number) , name (text) , trackid (number) | genre : genreid (number) , name (text) , genreid (number) | artist : name (text) , artistid (number) | mediatype : name (text) , mediatypeid (number) | playlist : name (text) , playlistid (number)


Question: Please show the employee first names and ids of employees who serve at least 10 customers.

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

customer : firstname (text) , supportrepid (number) , customerid (number) | employee : firstname (text) , employeeid (number) , employeeid (number)


Question: What are the first names and support rep ids for employees serving 10 or more customers?

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

customer : firstname (text) , supportrepid (number) , customerid (number) | employee : firstname (text) , employeeid (number) , employeeid (number)


Question: Please show the employee last names that serves no more than 20 customers.

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

customer : lastname (text) , supportrepid (number) , customerid (number) | employee : lastname (text) , employeeid (number) , employeeid (number)


Question: What are the last names of employees who serve at most 20 customers?

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

customer : lastname (text) , supportrepid (number) , customerid (number) | employee : lastname (text) , employeeid (number) , employeeid (number)


Question: Please list all album titles in alphabetical order.

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

album : title (text) , albumid (number) | employee : title (text) , employeeid (number)


Question: What are all the album titles, in alphabetical order?

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

album : title (text) , albumid (number) | employee : title (text) , employeeid (number)


Question: Please list the name and id of all artists that have at least 3 albums in alphabetical order.

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

artist : name (text) , artistid (number) , artistid (number) | genre : name (text) , genreid (number) | mediatype : name (text) , mediatypeid (number) | playlist : name (text) , playlistid (number) | track : name (text) , trackid (number) | album : artistid (number) , albumid (number)


Question: What are the names and ids of artists with 3 or more albums, listed in alphabetical order?

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

artist : name (text) , artistid (number) , artistid (number) | genre : name (text) , genreid (number) | mediatype : name (text) , mediatypeid (number) | playlist : name (text) , playlistid (number) | track : name (text) , trackid (number) | album : artistid (number) , albumid (number)


Question: Find the names of artists that do not have any albums.

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

artist : name (text) , artistid (number) , artistid (number) | genre : name (text) , genreid (number) | mediatype : name (text) , mediatypeid (number) | playlist : name (text) , playlistid (number) | track : name (text) , trackid (number) | album : artistid (number) , albumid (number)


Question: What are the names of artists who have not released any albums?

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

artist : name (text) , artistid (number) , artistid (number) | genre : name (text) , genreid (number) | mediatype : name (text) , mediatypeid (number) | playlist : name (text) , playlistid (number) | track : name (text) , trackid (number) | album : artistid (number) , albumid (number)


Question: What is the average unit price of rock tracks?

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

invoiceline : unitprice (number) , invoicelineid (number) | track : unitprice (number) , genreid (number) , name (text) , trackid (number) | genre : genreid (number) , name (text) , genreid (number) | artist : name (text) , artistid (number) | mediatype : name (text) , mediatypeid (number) | playlist : name (text) , playlistid (number)


Question: Find the average unit price of tracks from the Rock genre.

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

invoiceline : unitprice (number) , invoicelineid (number) | track : unitprice (number) , genreid (number) , name (text) , trackid (number) | genre : genreid (number) , name (text) , genreid (number) | artist : name (text) , artistid (number) | mediatype : name (text) , mediatypeid (number) | playlist : name (text) , playlistid (number)


Question: What are the duration of the longest and shortest pop tracks in milliseconds?

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

track : milliseconds (number) , genreid (number) , name (text) , trackid (number) | genre : genreid (number) , name (text) , genreid (number) | artist : name (text) , artistid (number) | mediatype : name (text) , mediatypeid (number) | playlist : name (text) , playlistid (number)


Question: Find the maximum and minimum millisecond lengths of pop tracks.

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

track : milliseconds (number) , genreid (number) , name (text) , trackid (number) | genre : genreid (number) , name (text) , genreid (number) | artist : name (text) , artistid (number) | mediatype : name (text) , mediatypeid (number) | playlist : name (text) , playlistid (number)


Question: What are the birth dates of employees living in Edmonton?

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

employee : birthdate (time) , city (text) , employeeid (number) | customer : city (text) , customerid (number)


Question: Find the birth dates corresponding to employees who live in the city of Edmonton.

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

employee : birthdate (time) , city (text) , employeeid (number) | customer : city (text) , customerid (number)


Question: What are the distinct unit prices of all tracks?

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

invoiceline : unitprice (number) , invoicelineid (number) | track : unitprice (number) , trackid (number)


Question: Find the distinct unit prices for tracks.

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

invoiceline : unitprice (number) , invoicelineid (number) | track : unitprice (number) , trackid (number)


Question: How many artists do not have any album?

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

album : artistid (number) , albumid (number) | artist : artistid (number) , artistid (number)


Question: Cound the number of artists who have not released an album.

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

album : artistid (number) , albumid (number) | artist : artistid (number) , artistid (number)


Question: What are the album titles for albums containing both 'Reggae' and 'Rock' genre tracks?

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

album : title (text) , albumid (number) , albumid (number) | employee : title (text) , employeeid (number) | track : albumid (number) , genreid (number) , name (text) , trackid (number) | genre : genreid (number) , name (text) , genreid (number) | artist : name (text) , artistid (number) | mediatype : name (text) , mediatypeid (number) | playlist : name (text) , playlistid (number)


Question: Find the titles of albums that contain tracks of both the Reggae and Rock genres.

album : albumid (number) , title (text) , artistid (number) | artist : artistid (number) , name (text) | customer : customerid (number) , firstname (text) , lastname (text) , company (text) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) , supportrepid (number) | employee : employeeid (number) , lastname (text) , firstname (text) , title (text) , reportsto (number) , birthdate (time) , hiredate (time) , address (text) , city (text) , state (text) , country (text) , postalcode (text) , phone (text) , fax (text) , email (text) | genre : genreid (number) , name (text) | invoice : invoiceid (number) , customerid (number) , invoicedate (time) , billingaddress (text) , billingcity (text) , billingstate (text) , billingcountry (text) , billingpostalcode (text) , total (number) | invoiceline : invoicelineid (number) , invoiceid (number) , trackid (number) , unitprice (number) , quantity (number) | mediatype : mediatypeid (number) , name (text) | playlist : playlistid (number) , name (text) | playlisttrack : playlistid (number) , trackid (number) | track : trackid (number) , name (text) , albumid (number) , mediatypeid (number) , genreid (number) , composer (text) , milliseconds (number) , bytes (number) , unitprice (number)

album : title (text) , albumid (number) , albumid (number) | employee : title (text) , employeeid (number) | track : albumid (number) , genreid (number) , name (text) , trackid (number) | genre : genreid (number) , name (text) , genreid (number) | artist : name (text) , artistid (number) | mediatype : name (text) , mediatypeid (number) | playlist : name (text) , playlistid (number)


Question: Find all the phone numbers.

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

available_policies : customer_phone (text) , policy_id (number)


Question: What are all the phone numbers?

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

available_policies : customer_phone (text) , policy_id (number)


Question: What are the customer phone numbers under the policy "Life Insurance"?

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

available_policies : customer_phone (text) , policy_type_code (text) , policy_id (number)


Question: What are the phone numbers of customers using the policy with the code "Life Insurance"?

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

available_policies : customer_phone (text) , policy_type_code (text) , policy_id (number)


Question: Which policy type has the most records in the database?

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

available_policies : policy_type_code (text) , policy_id (number)


Question: Which policy type appears most frequently in the available policies?

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

available_policies : policy_type_code (text) , policy_id (number)


Question: What are all the customer phone numbers under the most popular policy type?

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

available_policies : customer_phone (text) , policy_type_code (text) , policy_id (number)


Question: Find the phone numbers of customers using the most common policy type among the available policies.

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

available_policies : customer_phone (text) , policy_type_code (text) , policy_id (number)


Question: Find the policy type used by more than 4 customers.

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

available_policies : policy_type_code (text) , policy_id (number)


Question: Find the policy types more than 4 customers use. Show their type code.

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

available_policies : policy_type_code (text) , policy_id (number)


Question: Find the total and average amount of settlements.

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

settlements : settlement_amount (number) , settlement_id (number)


Question: Return the sum and average of all settlement amounts.

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

settlements : settlement_amount (number) , settlement_id (number)


Question: Find the name of services that have been used for more than 2 times in first notification of loss.

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

services : service_name (text) , service_id (number) , service_id (number) | first_notification_of_loss : service_id (number) , fnol_id (number)


Question: Which services have been used more than twice in first notification of loss? Return the service name.

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

services : service_name (text) , service_id (number) , service_id (number) | first_notification_of_loss : service_id (number) , fnol_id (number)


Question: What is the effective date of the claim that has the largest amount of total settlement?

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

claims : effective_date (time) , claim_id (number) , claim_id (number) | settlements : effective_date (time) , claim_id (number) , settlement_amount (number) , settlement_id (number)


Question: Find the claim that has the largest total settlement amount. Return the effective date of the claim.

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

claims : effective_date (time) , claim_id (number) , claim_id (number) | settlements : effective_date (time) , claim_id (number) , settlement_amount (number) , settlement_id (number)


Question: How many policies are listed for the customer named "Dayana Robel"?

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

customers : customer_id (number) , customer_name (text) , customer_id (number) | customers_policies : customer_id (number) , customer_id (number) | first_notification_of_loss : customer_id (number) , fnol_id (number)


Question: Count the total number of policies used by the customer named "Dayana Robel".

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

customers : customer_id (number) , customer_name (text) , customer_id (number) | customers_policies : customer_id (number) , customer_id (number) | first_notification_of_loss : customer_id (number) , fnol_id (number)


Question: What is the name of the customer who has the most policies listed?

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

customers : customer_name (text) , customer_id (number) , customer_id (number) | customers_policies : customer_id (number) , customer_id (number) | first_notification_of_loss : customer_id (number) , fnol_id (number)


Question: Which customer uses the most policies? Give me the customer name.

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

customers : customer_name (text) , customer_id (number) , customer_id (number) | customers_policies : customer_id (number) , customer_id (number) | first_notification_of_loss : customer_id (number) , fnol_id (number)


Question: What are all the policy types of the customer named "Dayana Robel"?

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

available_policies : policy_type_code (text) , policy_id (number) , policy_id (number) | customers : customer_id (number) , customer_name (text) , customer_id (number) | customers_policies : customer_id (number) , policy_id (number) , customer_id (number) | first_notification_of_loss : customer_id (number) , policy_id (number) , fnol_id (number)


Question: Tell me the types of the policy used by the customer named "Dayana Robel".

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

available_policies : policy_type_code (text) , policy_id (number) , policy_id (number) | customers : customer_id (number) , customer_name (text) , customer_id (number) | customers_policies : customer_id (number) , policy_id (number) , customer_id (number) | first_notification_of_loss : customer_id (number) , policy_id (number) , fnol_id (number)


Question: What are all the policy types of the customer that has the most policies listed?

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

available_policies : policy_type_code (text) , policy_id (number) , policy_id (number) | customers : customer_id (number) , customer_name (text) , customer_id (number) | customers_policies : customer_id (number) , policy_id (number) , customer_id (number) | first_notification_of_loss : customer_id (number) , policy_id (number) , fnol_id (number)


Question: List all the policy types used by the customer enrolled in the most policies.

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

available_policies : policy_type_code (text) , policy_id (number) , policy_id (number) | customers : customer_id (number) , customer_name (text) , customer_id (number) | customers_policies : customer_id (number) , policy_id (number) , customer_id (number) | first_notification_of_loss : customer_id (number) , policy_id (number) , fnol_id (number)


Question: List all the services in the alphabetical order.

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

services : service_name (text) , service_id (number)


Question: Give me a list of all the service names sorted alphabetically.

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

services : service_name (text) , service_id (number)


Question: How many services are there?

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)


Question: Count the total number of available services.

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)


Question: Find the names of users who do not have a first notification of loss record.

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

customers : customer_name (text) , customer_id (number) , customer_id (number) | customers_policies : customer_id (number) , customer_id (number) | first_notification_of_loss : customer_id (number) , fnol_id (number)


Question: Which customers do not have a first notification of loss record? Give me the customer names.

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

customers : customer_name (text) , customer_id (number) , customer_id (number) | customers_policies : customer_id (number) , customer_id (number) | first_notification_of_loss : customer_id (number) , fnol_id (number)


Question: Find the names of customers who have used either the service "Close a policy" or the service "Upgrade a policy".

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

customers : customer_name (text) , customer_id (number) , customer_id (number) | customers_policies : customer_id (number) , customer_id (number) | first_notification_of_loss : customer_id (number) , service_id (number) , fnol_id (number) | services : service_id (number) , service_name (text) , service_id (number)


Question: Which customers have used the service named "Close a policy" or "Upgrade a policy"? Give me the customer names.

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

customers : customer_name (text) , customer_id (number) , customer_id (number) | customers_policies : customer_id (number) , customer_id (number) | first_notification_of_loss : customer_id (number) , service_id (number) , fnol_id (number) | services : service_id (number) , service_name (text) , service_id (number)


Question: Find the names of customers who have used both the service "Close a policy" and the service "New policy application".

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

customers : customer_name (text) , customer_id (number) , customer_id (number) | customers_policies : customer_id (number) , customer_id (number) | first_notification_of_loss : customer_id (number) , service_id (number) , fnol_id (number) | services : service_id (number) , service_name (text) , service_id (number)


Question: Which customers have used both the service named "Close a policy" and the service named "Upgrade a policy"? Give me the customer names.

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

customers : customer_name (text) , customer_id (number) , customer_id (number) | customers_policies : customer_id (number) , customer_id (number) | first_notification_of_loss : customer_id (number) , service_id (number) , fnol_id (number) | services : service_id (number) , service_name (text) , service_id (number)


Question: Find the IDs of customers whose name contains "Diana".

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

customers : customer_id (number) , customer_name (text) , customer_id (number) | customers_policies : customer_id (number) , customer_id (number) | first_notification_of_loss : customer_id (number) , fnol_id (number)


Question: What are the IDs of customers who have "Diana" in part of their names?

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

customers : customer_id (number) , customer_name (text) , customer_id (number) | customers_policies : customer_id (number) , customer_id (number) | first_notification_of_loss : customer_id (number) , fnol_id (number)


Question: What are the maximum and minimum settlement amount on record?

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

settlements : settlement_amount (number) , settlement_id (number)


Question: Find the maximum and minimum settlement amount.

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

settlements : settlement_amount (number) , settlement_id (number)


Question: List all the customers in increasing order of IDs.

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

customers : customer_id (number) , customer_name (text) , customer_id (number) | customers_policies : customer_id (number) , customer_id (number) | first_notification_of_loss : customer_id (number) , fnol_id (number)


Question: What is the ordered list of customer ids?

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

customers : customer_id (number) , customer_name (text) , customer_id (number) | customers_policies : customer_id (number) , customer_id (number) | first_notification_of_loss : customer_id (number) , fnol_id (number)


Question: Retrieve the open and close dates of all the policies associated with the customer whose name contains "Diana"

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

customers_policies : date_opened (time) , date_closed (time) , customer_id (number) , customer_id (number) | customers : customer_id (number) , customer_name (text) , customer_id (number) | first_notification_of_loss : customer_id (number) , fnol_id (number)


Question: What are the open and close dates of all the policies used by the customer who have "Diana" in part of their names?

customers : customer_id (number) , customer_name (text) | services : service_id (number) , service_name (text) | available_policies : policy_id (number) , policy_type_code (text) , customer_phone (text) | customers_policies : customer_id (number) , policy_id (number) , date_opened (time) , date_closed (time) | first_notification_of_loss : fnol_id (number) , customer_id (number) , policy_id (number) , service_id (number) | claims : claim_id (number) , fnol_id (number) , effective_date (time) | settlements : settlement_id (number) , claim_id (number) , effective_date (time) , settlement_amount (number)

customers_policies : date_opened (time) , date_closed (time) , customer_id (number) , customer_id (number) | customers : customer_id (number) , customer_name (text) , customer_id (number) | first_notification_of_loss : customer_id (number) , fnol_id (number)


Question: How many kinds of enzymes are there?

medicine : id (number) , name (text) , trade_name (text) , fda_approved (text) | enzyme : id (number) , name (text) , location (text) , product (text) , chromosome (text) , omim (number) , porphyria (text) | medicine_enzyme_interaction : enzyme_id (number) , medicine_id (number) , interaction_type (text)


Question: What is the total count of enzymes?

medicine : id (number) , name (text) , trade_name (text) , fda_approved (text) | enzyme : id (number) , name (text) , location (text) , product (text) , chromosome (text) , omim (number) , porphyria (text) | medicine_enzyme_interaction : enzyme_id (number) , medicine_id (number) , interaction_type (text)


Question: List the name of enzymes in descending lexicographical order.

medicine : id (number) , name (text) , trade_name (text) , fda_approved (text) | enzyme : id (number) , name (text) , location (text) , product (text) , chromosome (text) , omim (number) , porphyria (text) | medicine_enzyme_interaction : enzyme_id (number) , medicine_id (number) , interaction_type (text)

medicine : name (text) , id (number) | enzyme : name (text) , id (number)


Question: What are the names of enzymes in descending order?

medicine : id (number) , name (text) , trade_name (text) , fda_approved (text) | enzyme : id (number) , name (text) , location (text) , product (text) , chromosome (text) , omim (number) , porphyria (text) | medicine_enzyme_interaction : enzyme_id (number) , medicine_id (number) , interaction_type (text)

medicine : name (text) , id (number) | enzyme : name (text) , id (number)


Question: List the names and the locations that the enzymes can make an effect.

medicine : id (number) , name (text) , trade_name (text) , fda_approved (text) | enzyme : id (number) , name (text) , location (text) , product (text) , chromosome (text) , omim (number) , porphyria (text) | medicine_enzyme_interaction : enzyme_id (number) , medicine_id (number) , interaction_type (text)

medicine : name (text) , id (number) | enzyme : name (text) , location (text) , id (number)


Question: What are the names and locations of all enzymes listed?

medicine : id (number) , name (text) , trade_name (text) , fda_approved (text) | enzyme : id (number) , name (text) , location (text) , product (text) , chromosome (text) , omim (number) , porphyria (text) | medicine_enzyme_interaction : enzyme_id (number) , medicine_id (number) , interaction_type (text)

medicine : name (text) , id (number) | enzyme : name (text) , location (text) , id (number)


Question: What is the maximum Online Mendelian Inheritance in Man (OMIM) value of the enzymes?

medicine : id (number) , name (text) , trade_name (text) , fda_approved (text) | enzyme : id (number) , name (text) , location (text) , product (text) , chromosome (text) , omim (number) , porphyria (text) | medicine_enzyme_interaction : enzyme_id (number) , medicine_id (number) , interaction_type (text)


Question: What is the maximum OMIM value in the database?

medicine : id (number) , name (text) , trade_name (text) , fda_approved (text) | enzyme : id (number) , name (text) , location (text) , product (text) , chromosome (text) , omim (number) , porphyria (text) | medicine_enzyme_interaction : enzyme_id (number) , medicine_id (number) , interaction_type (text)


Question: What is the product, chromosome and porphyria related to the enzymes which take effect at the location 'Cytosol'?

medicine : id (number) , name (text) , trade_name (text) , fda_approved (text) | enzyme : id (number) , name (text) , location (text) , product (text) , chromosome (text) , omim (number) , porphyria (text) | medicine_enzyme_interaction : enzyme_id (number) , medicine_id (number) , interaction_type (text)

enzyme : product (text) , chromosome (text) , porphyria (text) , location (text) , id (number)