FunctionRacerProblemsRace

Bought but Never Sold

MediumSQLSQLite

Return each symbol that has at least one buy and no sell at all, once. Rows may come in any order.

Example 1

trades
idsymbolsideqtyprice
1AAPLbuy10190.5
2AAPLsell4191.0
3MSFTbuy5410.0
4MSFTbuy1409.0
5KOsell261.0
returns
symbol
MSFT

Constraints

Race itor take your time

Write it in your browser, against the clock. The model query, with a note on each piece of it, comes after.

More SQL problems