Company: Uber Data science_8oct

Difficulty: medium

Problem Statement

Problem Description Write a SQL query to generate a report of companies and their overall review ratings. Your query should compute the average review rating across all category records for each company and format the output as a descriptive string. Schema The database schema is as follows: Table: companies id (SMALLINT): Unique identifier, primary key. name (VARCHAR(255)): Name of the company. address (VARCHAR(255)): Physical address. phone (VARCHAR(255)): Contact number. Table: categories company_id (SMALLINT): Foreign key referencing companies.id . name (VARCHAR(255)): The category or service type. review_rating (SMALLINT): The numeric rating received in that category. It is guaranteed to be NOT NULL. Required Output Your query should return the following columns in the exact order: name : The company name. address : The company address. phone : The company contact number. overall_review_rating : A formatted string in the exact format: "X.X (Y categories)" . X.X is the average revie

More Uber Data science_8oct OA questionsInterview experiences