Querying types of widgets
Suppose that each day widgets are produced on 3 assembly lines (A, B, and C) and eventually end up on one line where they are prepared for shipping. Suppose there's a data table called 'prod' that has widget origin (column name: 'origin') (either assembly line A, B, or C) as well as a numeric serial number (column name: serial number) which increases for each widget produced. You can assume this table is wiped clean on a daily basis.
Given the above, can you write a SQL query to pull the first 3 widgets produced on each line?
Note that here we are only given the schema of the table, but should still be able to construct a complete query.
Subscribe to premium account to see the solution.Get premium now