human
Schema:
artists (id, name)
sqlite_sequence (name, seq)
albums (id, title, artist_id)
employees (id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email)
customers (id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id)
genres (id, name)
invoices (id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total)
media_types (id, name)
tracks (id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price)
invoice_lines (id, invoice_id, track_id, unit_price, quantity)
playlists (id, name)
playlist_tracks (playlist_id, track_id)
Please answer with SQL.
assistant
Sure, I understand.
human
How many albums does Billy Cobham has?
assistant
SELECT count(*) FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = 'Billy Cobham';
human
Who is the composer of track Fast As a Shark?
assistant
SELECT composer FROM tracks WHERE name = 'Fast AS a Shark';
human
Eduardo Martins is a customer at which company?
assistant
SELECT company FROM customers WHERE first_name = 'Eduardo' AND last_name = 'Martins';
human
How many orders does Lucas Mancini has?
assistant
SELECT count(*) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = 'Lucas' AND T1.last_name = 'Mancini';
human
What is the total amount of money spent by Lucas Mancini?
assistant
SELECT sum(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = 'Lucas' AND T1.last_name = 'Mancini';
human
In which country does Roberto Almeida?
assistant
SELECT country FROM customers WHERE first_name = "Roberto" AND last_name = "Almeida" ;