Interview Query

Uniform Car Maker

Have you seen this question before?

Given a table of cars with columns id and make, write a query that outputs a random manufacturer’s name with an equal probability of selecting any name.


cars table

id make
1 Ford
2 Toyota
3 Toyota
4 Honda
5 Honda
6 Honda


Column Type
make Text
Next question: Restaurant Recommender
MySQL 8.0.17
Loading editor
Use Shift + Enter to run query