FunctionRacerProblemsRace

Share of the Total

MediumSQLSQLite

Return each symbol once with pct: the share of the table's total qty that was traded in that symbol, as a percentage rounded to 1 decimal. Rows may come in any order.

Example 1

trades
idsymbolqtyprice
1AAPL10190.5
2MSFT5410.0
3AAPL15191.0
returns
symbolpct
AAPL83.3
MSFT16.7

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