Top Coding Interview Question – Solved

9 Live
Oldest Book per Genre You have been provided with two tables, library_books and book_genres, containing information about books and their corresponding genres. Write an SQL query to find the oldest book (based on publication_year) in each genre. If there are multiple books with the same publication year in a genre, return the one that appears first alphabetically by title. Table description Input format Table: library_books book_id, int, Represents the unique ID of the book book_title, string, Represents the title of the book genre_ld, int, Represents the ID of the genre of the book

Asked in: No companies listed

Image of the Question

Question Image

All Testcases Passed βœ”



Passcode Image

Solution


Please login to view the solution


Related Questions

| Given an n x m grid, where rows are numbered from 7 to n and columns from 1 to … |
| There are 'N' coders standing in a line, where i denotes the ith position of a … |
| A birthday party was attended by N number of kids, and each kid was given a uni… |
| Given a matrix of size m * n, where m denotes the number of rows (starting with… |
| A traveler is traveling from the city of Zeta to Omega. He starts with X amount… |
| As an operations engineer at Amazon, you are responsible for organizing the dis… |