REST API: use HTTP GET to query a HackerRank TV-series endpoint and find the best TV show in a given genre (Java).
Asked in the Online assessment stage. OA question 1, linked as 'REST API best TV shows in genre'. Write a PostgreSQL query using the supplied genre parameter, \$1.
Output
- Return at most one row with
show_id, title, and average_rating.
- Include only shows in the requested genre with at least one non-NULL rating. Rows with a NULL rating are ignored.
- Sort by highest average rating, then title ascending, then
show_id ascending to break ties.