Skip to content

Commit

Permalink
Merge pull request #3187 from szarnyasg/nits-20240627e
Browse files Browse the repository at this point in the history
Formatting
  • Loading branch information
szarnyasg authored Jun 27, 2024
2 parents f940a97 + a229b5a commit 7132f72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions _posts/2022-05-04-friendlier-sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ For many functions, DuckDB supports multiple names in order to align with other
SELECT
'Use the Force, Luke'[:13] AS sliced_quote_1,
substr('I am your father', 1, 4) AS sliced_quote_2,
substring('Obi-Wan Kenobi, you''re my only hope',17,100) AS sliced_quote_3;
substring('Obi-Wan Kenobi, you''re my only hope', 17, 100) AS sliced_quote_3;
```

### Auto-Increment Duplicate Column Names
Expand All @@ -246,7 +246,7 @@ FROM (
s2.tie_fighter
FROM squadron_one s1
JOIN squadron_two s2
ON 1=1
ON 1 = 1
) theyre_coming_in_too_fast;
```

Expand All @@ -264,18 +264,18 @@ DuckDB believes in using specific data types for performance, but attempts to au
CREATE TABLE sith_count_int AS SELECT 2::INT AS sith_count;
CREATE TABLE sith_count_varchar AS SELECT 2::VARCHAR AS sith_count;

SELECT
SELECT
*
FROM sith_count_int s_int
JOIN sith_count_varchar s_char
ON s_int.sith_count = s_char.sith_count;
ON s_int.sith_count = s_char.sith_count;
```

<div class="narrow_table"></div>

| sith_count | sith_count |
|:---|:---|
| 2 | 2 |
| 2 | 2 |

### Other Friendly Features

Expand Down
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 @@ -424,7 +424,7 @@ and the timestamps have been shifted to be halfway between the originals:
```sql
CREATE OR REPLACE TABLE build AS (
SELECT k, '2001-01-01 00:00:00'::TIMESTAMP + INTERVAL (v) MINUTE AS t, v
FROM range(0, 100_000) vals(v), range(0,50) keys(k)
FROM range(0, 100_000) vals(v), range(0, 50) keys(k)
);

CREATE OR REPLACE TABLE probe AS (
Expand Down

0 comments on commit 7132f72

Please sign in to comment.