Skip to content

Commit

Permalink
Merge pull request #8 from sumnerib/patch-1
Browse files Browse the repository at this point in the history
Update sql_stock_ticker_cloud.adoc
  • Loading branch information
naadhira authored Apr 4, 2024
2 parents e35242f + 987b0c7 commit b6002a1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/modules/ROOT/pages/sql_stock_ticker_cloud.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -124,22 +124,22 @@ Because the data is randomly generated, you may have to wait several seconds for

+
```sql
SELECT ticker AS Symbol, ROUND(price,2) AS Price, amount AS "Shares Sold"
SELECT ticker AS Symbol, ROUND(price,2) AS Price, amt AS "Shares Sold"
FROM trades_topic;
```
. Limit the output to one stock symbol.
+
```sql
SELECT ticker AS Symbol, ROUND(price,2) AS Price, amount AS "Shares Sold"
SELECT ticker AS Symbol, ROUND(price,2) AS Price, amt AS "Shares Sold"
FROM trades_topic
WHERE ticker = 'APPL';
```
. Limit the output to one symbol and sales of over 50 shares.
+
```sql
SELECT ticker AS Symbol, ROUND(price,2), amount AS "Shares Sold"
SELECT ticker AS Symbol, ROUND(price,2), amt AS "Shares Sold"
FROM trades_topic
WHERE ticker = 'VOO' AND amount > 50;
WHERE ticker = 'VOO' AND amt > 50;
```

== Step 3. Enriching the Data
Expand Down Expand Up @@ -348,7 +348,7 @@ CREATE OR REPLACE VIEW tro_enriched AS
tro.ticker AS ticker,
companies.company as company,
ROUND(tro.price,2) AS price,
tro.amount AS shares,
tro.amt AS shares,
tro.trade_ts
FROM trades_ordered AS tro
JOIN companies
Expand Down

0 comments on commit b6002a1

Please sign in to comment.