Spaces:
Sleeping
Sleeping
File size: 33,600 Bytes
af733da | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 | {
"tables": [
{
"separator": "table_1",
"name": "Album",
"schema": "CREATE TABLE Album (AlbumId integer PRIMARY KEY, Title character varying(160), ArtistId integer);",
"description": "This table stores information about music albums.",
"columns": [
{
"name": "AlbumId",
"description": "unique identifier for albums.",
"synonyms": [
"album id"
]
},
{
"name": "Title",
"description": "title of the album",
"synonyms": [
"album title",
"album name"
]
},
{
"name": "ArtistId",
"description": "Id of the artist associated with the album",
"synonyms": [
"artist id"
]
}
],
"sample_queries": [
{
"query": "SELECT a.Title FROM Album a JOIN Artist ar ON a.ArtistId = ar.ArtistId WHERE ar.Name = 'AC/DC'",
"user_input": "Get all albums by AC/DC"
},
{
"query": "SELECT COUNT(*) FROM Album WHERE ArtistId = 1",
"user_input": "Count how many albums AC/DC has"
},
{
"query": "SELECT a.Title, ar.Name FROM Album a JOIN Artist ar ON a.ArtistId = ar.ArtistId ORDER BY a.Title ASC",
"user_input": "List all albums alphabetically with their artists"
},
{
"query": "SELECT a.Title FROM Album a JOIN Track t ON a.AlbumId = t.AlbumId GROUP BY a.AlbumId ORDER BY COUNT(t.TrackId) DESC LIMIT 1",
"user_input": "Find the album with the most tracks"
}
]
},
{
"separator": "table_2",
"name": "Artist",
"schema": "CREATE TABLE Artist (ArtistId integer PRIMARY KEY, Name character varying(120));",
"description": "This table stores information about music artists.",
"columns": [
{
"name": "ArtistId",
"description": "unique identifier for artists.",
"synonyms": [
"artist id"
]
},
{
"name": "Name",
"description": "name of the artist",
"synonyms": [
"artist name"
]
}
],
"sample_queries": [
{
"query": "SELECT Name FROM Artist WHERE ArtistId = 1",
"user_input": "Get artist name with id 1"
},
{
"query": "SELECT ar.Name, COUNT(a.AlbumId) as AlbumCount FROM Artist ar LEFT JOIN Album a ON ar.ArtistId = a.ArtistId GROUP BY ar.ArtistId ORDER BY AlbumCount DESC",
"user_input": "List artists by number of albums they have"
},
{
"query": "SELECT ar.Name FROM Artist ar JOIN Album a ON ar.ArtistId = a.ArtistId JOIN Track t ON a.AlbumId = t.AlbumId GROUP BY ar.ArtistId ORDER BY SUM(t.Milliseconds) DESC LIMIT 5",
"user_input": "Find top 5 artists with the longest total music duration"
},
{
"query": "SELECT ar.Name FROM Artist ar JOIN Album a ON ar.ArtistId = a.ArtistId JOIN Track t ON a.AlbumId = t.AlbumId JOIN InvoiceLine il ON t.TrackId = il.TrackId GROUP BY ar.ArtistId ORDER BY SUM(il.UnitPrice * il.Quantity) DESC LIMIT 3",
"user_input": "Find the top 3 best-selling artists by revenue"
}
]
},
{
"separator": "table_3",
"name": "Customer",
"schema": "CREATE TABLE Customer (CustomerId integer PRIMARY KEY, FirstName character varying(40), LastName character varying(20), Company character varying(80), Address character varying(70), City character varying(40), State character varying(40), Country character varying(40), PostalCode character varying(10), Phone character varying(24), Fax character varying(24), Email character varying(60), SupportRepId integer);",
"description": "This table stores information about customers who purchase music.",
"columns": [
{
"name": "CustomerId",
"description": "unique identifier for customers",
"synonyms": [
"customer id"
]
},
{
"name": "FirstName",
"description": "first name of the customer",
"synonyms": [
"first name"
]
},
{
"name": "LastName",
"description": "last name of the customer",
"synonyms": [
"last name",
"surname"
]
},
{
"name": "Company",
"description": "company name of the customer if applicable",
"synonyms": [
"company name",
"organization"
]
},
{
"name": "Address",
"description": "street address of the customer",
"synonyms": [
"street address"
]
},
{
"name": "City",
"description": "city where the customer lives",
"synonyms": [
"customer city"
]
},
{
"name": "State",
"description": "state or province where customer lives",
"synonyms": [
"province"
]
},
{
"name": "Country",
"description": "country where customer lives",
"synonyms": [
"nation"
]
},
{
"name": "PostalCode",
"description": "postal or zip code of customer's address",
"synonyms": [
"zip code"
]
},
{
"name": "Phone",
"description": "phone number of the customer",
"synonyms": [
"telephone"
]
},
{
"name": "Fax",
"description": "fax number of the customer if available",
"synonyms": [
"facsimile"
]
},
{
"name": "Email",
"description": "email address of the customer",
"synonyms": [
"email address"
]
},
{
"name": "SupportRepId",
"description": "Id of employee assigned as the customer's support representative",
"synonyms": [
"support rep id",
"employee id"
]
}
],
"sample_queries": [
{
"query": "SELECT FirstName, LastName, Email FROM Customer WHERE Country = 'Brazil'",
"user_input": "Get all Brazilian customers with their emails"
},
{
"query": "SELECT Country, COUNT(*) as CustomerCount FROM Customer GROUP BY Country ORDER BY CustomerCount DESC",
"user_input": "List countries by number of customers"
},
{
"query": "SELECT c.FirstName, c.LastName, SUM(i.Total) as TotalSpent FROM Customer c JOIN Invoice i ON c.CustomerId = i.CustomerId GROUP BY c.CustomerId ORDER BY TotalSpent DESC LIMIT 5",
"user_input": "Find top 5 customers by total spending"
},
{
"query": "SELECT c.Email FROM Customer c LEFT JOIN Invoice i ON c.CustomerId = i.CustomerId WHERE i.InvoiceId IS NULL",
"user_input": "Find customers who haven't made any purchases"
}
]
},
{
"separator": "table_4",
"name": "Employee",
"schema": "CREATE TABLE Employee (EmployeeId integer PRIMARY KEY, LastName character varying(20), FirstName character varying(20), Title character varying(30), ReportsTo integer, BirthDate timestamp without time zone, HireDate timestamp without time zone, Address character varying(70), City character varying(40), State character varying(40), Country character varying(40), PostalCode character varying(10), Phone character varying(24), Fax character varying(24), Email character varying(60));",
"description": "This table stores information about employees who work for the music store.",
"columns": [
{
"name": "EmployeeId",
"description": "unique identifier for employees",
"synonyms": [
"employee id"
]
},
{
"name": "LastName",
"description": "last name of the employee",
"synonyms": [
"surname"
]
},
{
"name": "FirstName",
"description": "first name of the employee",
"synonyms": [
"given name"
]
},
{
"name": "Title",
"description": "job title of the employee",
"synonyms": [
"position",
"job title"
]
},
{
"name": "ReportsTo",
"description": "Id of the employee's manager",
"synonyms": [
"manager id",
"supervisor id"
]
},
{
"name": "BirthDate",
"description": "date of birth of the employee",
"synonyms": [
"date of birth",
"DOB"
]
},
{
"name": "HireDate",
"description": "date when the employee was hired",
"synonyms": [
"start date",
"employment date"
]
},
{
"name": "Address",
"description": "street address of the employee",
"synonyms": [
"street address"
]
},
{
"name": "City",
"description": "city where the employee lives",
"synonyms": [
"employee city"
]
},
{
"name": "State",
"description": "state or province where employee lives",
"synonyms": [
"province"
]
},
{
"name": "Country",
"description": "country where employee lives",
"synonyms": [
"nation"
]
},
{
"name": "PostalCode",
"description": "postal or zip code of employee's address",
"synonyms": [
"zip code"
]
},
{
"name": "Phone",
"description": "phone number of the employee",
"synonyms": [
"telephone"
]
},
{
"name": "Fax",
"description": "fax number of the employee if available",
"synonyms": [
"facsimile"
]
},
{
"name": "Email",
"description": "email address of the employee",
"synonyms": [
"email address"
]
}
],
"sample_queries": [
{
"query": "SELECT FirstName, LastName FROM Employee WHERE Title = 'Sales Manager'",
"user_input": "Get all sales managers"
},
{
"query": "SELECT e1.FirstName, e1.LastName, e2.FirstName as ManagerFirstName, e2.LastName as ManagerLastName FROM Employee e1 LEFT JOIN Employee e2 ON e1.ReportsTo = e2.EmployeeId",
"user_input": "List all employees with their managers"
},
{
"query": "SELECT COUNT(*) FROM Employee WHERE STRFTIME('%Y', HireDate) = '2002'",
"user_input": "Count employees hired in 2002"
},
{
"query": "SELECT e.FirstName, e.LastName, SUM(i.Total) as TotalSales FROM Employee e JOIN Customer c ON e.EmployeeId = c.SupportRepId JOIN Invoice i ON c.CustomerId = i.CustomerId GROUP BY e.EmployeeId ORDER BY TotalSales DESC",
"user_input": "Rank employees by total sales from their customers"
}
]
},
{
"separator": "table_5",
"name": "Genre",
"schema": "CREATE TABLE Genre (GenreId integer PRIMARY KEY, Name character varying(120));",
"description": "This table stores music genres.",
"columns": [
{
"name": "GenreId",
"description": "unique identifier for genres",
"synonyms": [
"genre id"
]
},
{
"name": "Name",
"description": "name of the genre",
"synonyms": [
"genre name"
]
}
],
"sample_queries": [
{
"query": "SELECT Name FROM Genre WHERE GenreId = 1",
"user_input": "Get the genre name with id 1"
},
{
"query": "SELECT g.Name, COUNT(t.TrackId) as TrackCount FROM Genre g JOIN Track t ON g.GenreId = t.GenreId GROUP BY g.GenreId ORDER BY TrackCount DESC",
"user_input": "List genres by number of tracks"
},
{
"query": "SELECT g.Name, SUM(t.Milliseconds)/3600000 as Hours FROM Genre g JOIN Track t ON g.GenreId = t.GenreId GROUP BY g.GenreId ORDER BY Hours DESC",
"user_input": "Total hours of music by genre"
},
{
"query": "SELECT g.Name, SUM(il.UnitPrice * il.Quantity) as Revenue FROM Genre g JOIN Track t ON g.GenreId = t.GenreId JOIN InvoiceLine il ON t.TrackId = il.TrackId GROUP BY g.GenreId ORDER BY Revenue DESC",
"user_input": "Revenue generated by each genre"
}
]
},
{
"separator": "table_6",
"name": "Invoice",
"schema": "CREATE TABLE Invoice (InvoiceId integer PRIMARY KEY, CustomerId integer, InvoiceDate timestamp without time zone, BillingAddress character varying(70), BillingCity character varying(40), BillingState character varying(40), BillingCountry character varying(40), BillingPostalCode character varying(10), Total numeric(10,2));",
"description": "This table stores invoices for customer purchases.",
"columns": [
{
"name": "InvoiceId",
"description": "unique identifier for invoices",
"synonyms": [
"invoice id"
]
},
{
"name": "CustomerId",
"description": "Id of the customer associated with the invoice",
"synonyms": [
"customer id"
]
},
{
"name": "InvoiceDate",
"description": "date when the invoice was generated",
"synonyms": [
"date",
"purchase date"
]
},
{
"name": "BillingAddress",
"description": "billing address for the invoice",
"synonyms": [
"address"
]
},
{
"name": "BillingCity",
"description": "city for the billing address",
"synonyms": [
"city"
]
},
{
"name": "BillingState",
"description": "state or province for the billing address",
"synonyms": [
"state",
"province"
]
},
{
"name": "BillingCountry",
"description": "country for the billing address",
"synonyms": [
"country"
]
},
{
"name": "BillingPostalCode",
"description": "postal code for the billing address",
"synonyms": [
"zip code",
"postal code"
]
},
{
"name": "Total",
"description": "total amount of the invoice",
"synonyms": [
"amount",
"price"
]
}
],
"sample_queries": [
{
"query": "SELECT SUM(Total) as TotalSales FROM Invoice WHERE strftime('%Y', InvoiceDate) = '2009'",
"user_input": "Get total sales for 2009"
},
{
"query": "SELECT strftime('%Y-%m', InvoiceDate) as Month, SUM(Total) as MonthlyRevenue FROM Invoice GROUP BY Month ORDER BY Month",
"user_input": "Monthly revenue over time"
},
{
"query": "SELECT BillingCountry, SUM(Total) as Revenue FROM Invoice GROUP BY BillingCountry ORDER BY Revenue DESC",
"user_input": "Total revenue by country"
},
{
"query": "SELECT i.InvoiceId, COUNT(il.InvoiceLineId) as Items FROM Invoice i JOIN InvoiceLine il ON i.InvoiceId = il.InvoiceId GROUP BY i.InvoiceId ORDER BY Items DESC LIMIT 1",
"user_input": "Find the invoice with the most items"
}
]
},
{
"separator": "table_7",
"name": "InvoiceLine",
"schema": "CREATE TABLE InvoiceLine (InvoiceLineId integer PRIMARY KEY, InvoiceId integer, TrackId integer, UnitPrice numeric(10,2), Quantity integer);",
"description": "This table stores individual line items for each invoice.",
"columns": [
{
"name": "InvoiceLineId",
"description": "unique identifier for invoice lines",
"synonyms": [
"line id"
]
},
{
"name": "InvoiceId",
"description": "Id of the invoice this line belongs to",
"synonyms": [
"invoice id"
]
},
{
"name": "TrackId",
"description": "Id of the track purchased",
"synonyms": [
"track id"
]
},
{
"name": "UnitPrice",
"description": "price of the track",
"synonyms": [
"price"
]
},
{
"name": "Quantity",
"description": "number of tracks purchased",
"synonyms": [
"amount",
"count"
]
}
],
"sample_queries": [
{
"query": "SELECT t.Name, il.UnitPrice, il.Quantity FROM InvoiceLine il JOIN Track t ON il.TrackId = t.TrackId WHERE il.InvoiceId = 1",
"user_input": "Get details of purchase in invoice 1"
},
{
"query": "SELECT t.Name, SUM(il.Quantity) as TimesPurchased FROM InvoiceLine il JOIN Track t ON il.TrackId = t.TrackId GROUP BY il.TrackId ORDER BY TimesPurchased DESC LIMIT 10",
"user_input": "Find the top 10 most purchased tracks"
},
{
"query": "SELECT i.InvoiceId, SUM(il.UnitPrice * il.Quantity) as TotalAmount FROM InvoiceLine il JOIN Invoice i ON il.InvoiceId = i.InvoiceId GROUP BY i.InvoiceId HAVING TotalAmount > 10",
"user_input": "Find invoices with total amount greater than $10"
},
{
"query": "SELECT AVG(UnitPrice) as AveragePrice FROM InvoiceLine",
"user_input": "Find the average unit price of purchased items"
}
]
},
{
"separator": "table_8",
"name": "MediaType",
"schema": "CREATE TABLE MediaType (MediaTypeId integer PRIMARY KEY, Name character varying(120));",
"description": "This table stores types of media formats for music tracks.",
"columns": [
{
"name": "MediaTypeId",
"description": "unique identifier for media types",
"synonyms": [
"media type id"
]
},
{
"name": "Name",
"description": "name of the media type",
"synonyms": [
"media type name",
"format"
]
}
],
"sample_queries": [
{
"query": "SELECT Name FROM MediaType",
"user_input": "List all available media types"
},
{
"query": "SELECT mt.Name, COUNT(t.TrackId) as TrackCount FROM MediaType mt JOIN Track t ON mt.MediaTypeId = t.MediaTypeId GROUP BY mt.MediaTypeId ORDER BY TrackCount DESC",
"user_input": "Count tracks by media type"
},
{
"query": "SELECT mt.Name, SUM(il.UnitPrice * il.Quantity) as Revenue FROM MediaType mt JOIN Track t ON mt.MediaTypeId = t.MediaTypeId JOIN InvoiceLine il ON t.TrackId = il.TrackId GROUP BY mt.MediaTypeId ORDER BY Revenue DESC",
"user_input": "Revenue generated by each media type"
},
{
"query": "SELECT mt.Name, SUM(t.Milliseconds)/3600000 as Hours FROM MediaType mt JOIN Track t ON mt.MediaTypeId = t.MediaTypeId GROUP BY mt.MediaTypeId ORDER BY Hours DESC",
"user_input": "Total duration in hours of each media type"
}
]
},
{
"separator": "table_9",
"name": "Playlist",
"schema": "CREATE TABLE Playlist (PlaylistId integer PRIMARY KEY, Name character varying(120));",
"description": "This table stores playlists of tracks.",
"columns": [
{
"name": "PlaylistId",
"description": "unique identifier for playlists",
"synonyms": [
"playlist id"
]
},
{
"name": "Name",
"description": "name of the playlist",
"synonyms": [
"playlist name"
]
}
],
"sample_queries": [
{
"query": "SELECT Name FROM Playlist WHERE PlaylistId = 1",
"user_input": "Get the name of playlist with id 1"
},
{
"query": "SELECT p.Name, COUNT(pt.TrackId) as TrackCount FROM Playlist p JOIN PlaylistTrack pt ON p.PlaylistId = pt.PlaylistId GROUP BY p.PlaylistId ORDER BY TrackCount DESC",
"user_input": "List playlists by number of tracks"
},
{
"query": "SELECT p.Name, SUM(t.Milliseconds)/60000 as Minutes FROM Playlist p JOIN PlaylistTrack pt ON p.PlaylistId = pt.PlaylistId JOIN Track t ON pt.TrackId = t.TrackId GROUP BY p.PlaylistId ORDER BY Minutes DESC",
"user_input": "Find the total duration of each playlist in minutes"
},
{
"query": "SELECT p.Name, COUNT(DISTINCT g.GenreId) as GenreCount FROM Playlist p JOIN PlaylistTrack pt ON p.PlaylistId = pt.PlaylistId JOIN Track t ON pt.TrackId = t.TrackId JOIN Genre g ON t.GenreId = g.GenreId GROUP BY p.PlaylistId ORDER BY GenreCount DESC",
"user_input": "Count how many different genres are in each playlist"
}
]
},
{
"separator": "table_10",
"name": "PlaylistTrack",
"schema": "CREATE TABLE PlaylistTrack (PlaylistId integer, TrackId integer, PRIMARY KEY (PlaylistId, TrackId));",
"description": "This junction table connects playlists and tracks in a many-to-many relationship.",
"columns": [
{
"name": "PlaylistId",
"description": "Id of the playlist",
"synonyms": [
"playlist id"
]
},
{
"name": "TrackId",
"description": "Id of the track in the playlist",
"synonyms": [
"track id"
]
}
],
"sample_queries": [
{
"query": "SELECT t.Name FROM Track t JOIN PlaylistTrack pt ON t.TrackId = pt.TrackId WHERE pt.PlaylistId = 1",
"user_input": "Get all tracks in playlist 1"
},
{
"query": "SELECT t.Name, COUNT(pt.PlaylistId) as PlaylistCount FROM Track t JOIN PlaylistTrack pt ON t.TrackId = pt.TrackId GROUP BY t.TrackId ORDER BY PlaylistCount DESC LIMIT 10",
"user_input": "Find the top 10 tracks that appear in the most playlists"
},
{
"query": "SELECT p1.Name, p2.Name, COUNT(pt1.TrackId) as CommonTracks FROM Playlist p1 JOIN PlaylistTrack pt1 ON p1.PlaylistId = pt1.PlaylistId JOIN PlaylistTrack pt2 ON pt1.TrackId = pt2.TrackId JOIN Playlist p2 ON pt2.PlaylistId = p2.PlaylistId WHERE p1.PlaylistId < p2.PlaylistId GROUP BY p1.PlaylistId, p2.PlaylistId ORDER BY CommonTracks DESC LIMIT 5",
"user_input": "Find the top 5 playlist pairs that share the most tracks"
},
{
"query": "SELECT g.Name, COUNT(pt.TrackId) as TracksInPlaylists FROM Genre g JOIN Track t ON g.GenreId = t.GenreId JOIN PlaylistTrack pt ON t.TrackId = pt.TrackId GROUP BY g.GenreId ORDER BY TracksInPlaylists DESC",
"user_input": "Popularity of genres in playlists by track count"
}
]
},
{
"separator": "table_11",
"name": "Track",
"schema": "CREATE TABLE Track (TrackId integer PRIMARY KEY, Name character varying(200), AlbumId integer, MediaTypeId integer, GenreId integer, Composer character varying(220), Milliseconds integer, Bytes integer, UnitPrice numeric(10,2));",
"description": "This table stores information about individual music tracks.",
"columns": [
{
"name": "TrackId",
"description": "unique identifier for tracks",
"synonyms": [
"track id"
]
},
{
"name": "Name",
"description": "name of the track",
"synonyms": [
"track name",
"song title"
]
},
{
"name": "AlbumId",
"description": "Id of the album this track belongs to",
"synonyms": [
"album id"
]
},
{
"name": "MediaTypeId",
"description": "Id of the media type for this track",
"synonyms": [
"media type id",
"format id"
]
},
{
"name": "GenreId",
"description": "Id of the genre this track belongs to",
"synonyms": [
"genre id"
]
},
{
"name": "Composer",
"description": "name of the composer of this track",
"synonyms": [
"writer",
"songwriter"
]
},
{
"name": "Milliseconds",
"description": "length of the track in milliseconds",
"synonyms": [
"duration",
"length"
]
},
{
"name": "Bytes",
"description": "size of the track file in bytes",
"synonyms": [
"file size"
]
},
{
"name": "UnitPrice",
"description": "price of the track",
"synonyms": [
"price",
"cost"
]
}
],
"sample_queries": [
{
"query": "SELECT t.Name, a.Title FROM Track t JOIN Album a ON t.AlbumId = a.AlbumId WHERE t.Composer LIKE '%Johnson%'",
"user_input": "Find all tracks composed by someone with Johnson in their name"
},
{
"query": "SELECT Name, Milliseconds/60000 as Minutes FROM Track ORDER BY Milliseconds DESC LIMIT 10",
"user_input": "Find the 10 longest tracks by duration"
},
{
"query": "SELECT g.Name, AVG(t.UnitPrice) as AvgPrice FROM Track t JOIN Genre g ON t.GenreId = g.GenreId GROUP BY t.GenreId ORDER BY AvgPrice DESC",
"user_input": "Average price of tracks by genre"
},
{
"query": "SELECT Name, Composer, Milliseconds/60000 as Minutes FROM Track WHERE Composer IS NOT NULL AND Milliseconds = (SELECT MAX(Milliseconds) FROM Track)",
"user_input": "Find the longest track and its composer"
}
]
}
]
}
|