Skip to content

Commit

Permalink
AsOf examples: Quote keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
szarnyasg committed Jan 2, 2024
1 parent dd382bf commit d54ce58
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion _posts/2023-09-15-asof-joins-fuzzy-temporal-lookups.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ Our first query can then be written as:

```sql
SELECT ticker, h.when, price * shares AS value
FROM holdings h ASOF JOIN prices p USING(ticker, when);
FROM holdings h ASOF JOIN prices p USING(ticker, "when");
```

Be aware that if you don't explicitly list the columns in the `SELECT`,
Expand Down
4 changes: 2 additions & 2 deletions docs/sql/query_syntax/from.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ which will be greater than or equal to (`>=`):

```sql
SELECT *
FROM trades t ASOF JOIN prices p USING (symbol, when);
FROM trades t ASOF JOIN prices p USING (symbol, "when");
-- Returns symbol, trades.when, price (but NOT prices.when)
```

Expand All @@ -280,7 +280,7 @@ To get the `prices` times in the example, you will need to list the columns expl

```sql
SELECT t.symbol, t.when AS trade_when, p.when AS price_when, price
FROM trades t ASOF LEFT JOIN prices p USING (symbol, when);
FROM trades t ASOF LEFT JOIN prices p USING (symbol, "when");
```

## Syntax
Expand Down

0 comments on commit d54ce58

Please sign in to comment.