Top Coding Interview Question – Solved

8 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

| You are given a board of size M Γ— N where each cell can be either empty ('O') o… |
| Undirected Coloured Graph Shortest Path You are given an undirected weight… |
| Village Voyage A computer game "Village Voyage" has N villages (labeled 1 to… |
| Academic Decathlon Students are being selected for an academic decathlon tea… |
| Sum of Arrays Given two arrays each of length n, arr1 and arr2, in one opera… |
| Count Swaps During Custom Sorting Analyze the efficiency of the following so… |