Skip to content

Commit

Permalink
Merge pull request #7 from hazelcast-guides/stock-ticker-sql-fixes
Browse files Browse the repository at this point in the history
Update sql_stock_ticker_cloud.adoc to fix SQL problems & fix link in readme
  • Loading branch information
naadhira authored Apr 4, 2024
2 parents 52779fa + 5c35e7b commit e35242f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Replace <filename> with the name of your repository, and replace <tutorial name> with the title of the tutorial.
// For guidance on using this template, see .github/CONTRIBUTING.adoc
This repository hosts the documentation and code samples for the link:https://docs.hazelcast.com/tutorials/sql_stock_ticker_cloud_[SQL Basics - Stock Ticker on Hazelcast Cloud].
This repository hosts the documentation and code samples for the link:https://docs.hazelcast.com/tutorials/sql_stock_ticker_cloud[SQL Basics - Stock Ticker on Hazelcast Cloud].
8 changes: 4 additions & 4 deletions docs/modules/ROOT/pages/sql_stock_ticker_cloud.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ EXTERNAL NAME "sql_basics.trades" (
ticker varchar,
price double,
trade_ts timestamp with time zone,
amt int
amount int EXTERNAL NAME amt
)
DATA CONNECTION "TrainingKafkaConnection"
OPTIONS (
Expand Down Expand Up @@ -187,7 +187,7 @@ SELECT
trades.ticker AS Symbol,
companies.company as Company,
ROUND(trades.price,2) AS Price,
trades.amt AS "Shares Sold"
trades.amount AS "Shares Sold"
FROM trades_topic AS trades
JOIN companies
ON companies.ticker = trades.ticker;
Expand Down Expand Up @@ -325,7 +325,7 @@ SELECT
pr.average AS Average,
ROUND(((tro.price/pr.average)-1)*100,2) AS Percent_Change,
CASE
WHEN (ROUND(((tro.price/pr.average)-1)*100,2) > 1) THEN 'Up'
WHEN (ROUND(((tro.price/pr.average)-1)*100,2) > 0) THEN 'Up'
ELSE 'Down'
END AS Up_Down
FROM trades_ordered AS tro
Expand Down Expand Up @@ -380,7 +380,7 @@ SELECT * FROM high_low_enriched;
+
```sql
SELECT * FROM high_low_enriched
WHERE ticker = "APPL";
WHERE ticker = 'APPL';
```
. Create an IMap to serve as a sink for the data generated by `high_low_enriched`.
+
Expand Down

0 comments on commit e35242f

Please sign in to comment.