nl2sql-api / backend /Q&A_report_defog_sqlcoder-7b-2.csv
dvwn's picture
Update evaluation_mode.py & interactive_mode.py version 1.1.0
c96208b
Raw
History Blame Contribute Delete
4.74 kB
id,model_id,question,status,data_returned_correct,attempts,nl_response,sql_generated,error
1,defog/sqlcoder-7b-2,List all the artists name in the database.,success,True,1,,"SELECT a.""Name"" FROM ""Artist"" a;",
2,defog/sqlcoder-7b-2,How many genres are there?,success,True,1, There are 25 genres in the database.,SELECT COUNT(g.genreid) AS number_of_genres FROM genre g;,
3,defog/sqlcoder-7b-2,List the names of the first 5 tracks.,success,True,1," The first 5 tracks are:
[('For Those About To Rock (We Salute You)',), ('Balls to the Wall',), ('Fast As a Shark',), ('Restless and Wild',), ('Princess of the Dawn',)]","SELECT t.name FROM ""Track"" t LIMIT 5;",
4,defog/sqlcoder-7b-2,Count the number of customers located in the USA.,Error executing SQL after 3 attempts,False,0,N/A,"SELECT COUNT(*) FROM ""Customer"" c WHERE c.Country ILIKE '%USA%';","near ""ILIKE"": syntax error"
5,defog/sqlcoder-7b-2,Find all invoices for the customer with ID 1.,success,True,1," The user asked the following question: ""Find all invoices for the customer with ID 1.""",SELECT * FROM Invoice i WHERE i.CustomerId = 1;,
6,defog/sqlcoder-7b-2,List each album title along with the artist's name.,Error executing SQL after 3 attempts,True,0,N/A,"SELECT a.""Title"", ar.""Name"" AS ""Artist Name"" FROM ""Album"" a JOIN ""Artist"" ar ON a.""ArtistId"" = ar.""ArtistId"";","(Request ID: Root=1-6a08e19d-1afb35d014009a893606e2f5;074f3f39-9bf6-45d9-a1be-4a596301074a)
Bad request:
{'message': ""This model's maximum context length is 4096 tokens. However, you requested 512 output tokens and your prompt contains at least 3585 input tokens, for a total of at least 4097 tokens. Please reduce the length of the input prompt or the number of requested output tokens. (parameter=input_tokens, value=3585)"", 'type': 'invalid_request_error', 'param': None, 'code': 'bad_request'}"
7,defog/sqlcoder-7b-2,How many tracks belong to the 'Rock' genre?,success,True,1, There are 1297 tracks in the 'Rock' genre.,"SELECT COUNT(t.TrackId) AS number_of_tracks FROM ""Track"" t JOIN ""Genre"" g ON t.GenreId = g.GenreId WHERE g.Name = 'Rock';",
8,defog/sqlcoder-7b-2,Show the total revenue generated from each country.,Error executing SQL after 3 attempts,False,0,N/A,"SELECT c.country_name, SUM(i.total) AS total_revenue FROM ""Invoice"" i JOIN ""Customer"" c ON i.customer_id = c.customer_id GROUP BY c.country_name ORDER BY total_revenue DESC NULLS LAST;",no such column: c.country_name
9,defog/sqlcoder-7b-2,Find the total number of items sold for each media type.,Error executing SQL after 3 attempts,False,0,N/A,"SELECT m.name AS media_type, COUNT(*) AS total_items_sold FROM ""MediaType"" m JOIN ""Sales"" s ON m.media_type_id = s.media_type_id GROUP BY m.name;",no such table: Sales
10,defog/sqlcoder-7b-2,List the first and last names of all employees who are Sales Support Agents.,Error executing SQL after 3 attempts,False,0,N/A,"SELECT e.first_name, e.last_name FROM ""Employee"" e WHERE e.title = 'Sales Support Agent';",no such column: e.first_name
11,defog/sqlcoder-7b-2,List the top 5 customers who have spent the most money in total.,Error executing SQL after 3 attempts,False,0,N/A,"SELECT c.customerid, c.firstname, c.lastname, SUM(oi.productid * oi.quantity) AS total_spent FROM customer c JOIN orders o ON c.customerid = o.customerid JOIN orderitems oi ON o.orderid = oi.orderid GROUP BY c.customerid, c.firstname, c.lastname ORDER BY total_spent DESC LIMIT 5;",no such table: orders
12,defog/sqlcoder-7b-2,Which artist has the most tracks in the database? Give the name and count.,success,False,2," The artist with the most tracks in the database is ""The Beatles"" with 52 tracks.",,
13,defog/sqlcoder-7b-2,Which genres have more than 100 tracks? List the genre name and count.,success,True,1," The database returned more than 5 rows, so I will provide a brief summary sentence.","SELECT g.name, COUNT(t.trackid) AS COUNT FROM genre g JOIN track t ON g.genreid = t.genreid GROUP BY g.name HAVING COUNT(t.trackid) > 100 ORDER BY COUNT DESC NULLS LAST;",
14,defog/sqlcoder-7b-2,Calculate the average track length in seconds for each genre.,Error executing SQL after 3 attempts,False,0,N/A,"SELECT g.Name, AVG(t.Milliseconds / 1000)) AS AverageDuration FROM Track t JOIN Genre g ON t.GenreId = g.GenreId GROUP BY g.Name ORDER BY AverageDuration DESC NULLS LAST;","near "")"": syntax error"
15,defog/sqlcoder-7b-2,Identify the artist who has earned the most revenue from customers in Canada.,Error executing SQL after 3 attempts,False,0,N/A,"SELECT a.""Name"" FROM ""Artist"" a JOIN ""Album"" al ON a.""ArtistId"" = al.""AlbumArtistId"" WHERE al.""AlbumCountry"" = 'Canada' ORDER BY a.""Name"" DESC NULLS LAST LIMIT 1;",no such column: al.AlbumCountry