Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Basic SQL Query

EasySQL · PostgreSQL00:00
Practice interviewer
In session
5 left
00:00

Your question is Basic SQL Query. Start with the requirements and the one table on the right.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.

Problem

Write a SQL query to query a database for Zynga.

Assume the relevant table is companies. Return the record whose company name is Zynga.

Output

  1. One row for the matching company
  2. Columns: company_id, company_name, industry, headquarters_city, and founded_year
  3. Sort by company_id in ascending order

Schema

companies
ColumnTypeDescription
company_idPKINTUnique company identifier
company_nameVARCHAR(100)Company name
industryVARCHAR(100)Primary industry classification
headquarters_cityVARCHAR(100)City where the company is headquartered
founded_yearINTYear the company was founded
Tablescompanies
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results