Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
1 vote
6 answers
255 views

I work with a health insurance database. tab1 contains data regarding drug dispensing. There is about one billion rows per months. CREATE TABLE tab1 ( id NUMBER, -- patient id dte DATE, -- ...
Thomas's user avatar
  • 553
2 votes
1 answer
232 views

I have a json col in a table along with an id: id json_col abc123 json_text json value is as below: [ { "type": 0, "isPro": true, "addOns": [ { ...
1 vote
2 answers
81 views

I am interested in if there is an easier way to perform the following query than looping over unions. What I want to do is have separate where clauses based on different filtering fields. Say I have ...
ktj1989's user avatar
  • 837
0 votes
4 answers
157 views

I would like to query some IDs (fixed values) into a table, like a "outer join" with the mandatory fields should be the fixed values. I have to do the same for SQL Server and MySQL, but with ...
2 votes
1 answer
62 views

I want to rewrite old sql select * from a, b, c where a.columnA = b.columnB and a.columnC *= c.columnD and a.columnE *= c.columnF I tried as below select * from a join b on a.columnA = b.columnB left ...
tom's user avatar
  • 31
0 votes
2 answers
129 views

Just for curiosity, is there a short/pretty way to write classic SQL where clauses without the AND operator for joining tables? Classic: select * from table1, table2, table3 where table1.fkId = ...
0 votes
2 answers
73 views

I have a main table, Table 1, that includes columns for student ID and some other info. There is also Table 2 which includes columns for student ID, survey question, and response. Essentially, I want ...
0 votes
1 answer
2k views

I’m trying to convert a "string" column into all float values and can’t seem to get the correct output. The STRING values are all in #.## format (eg. 2.33, 4.25, 3.75, etc.) I have a query that looks ...
0 votes
1 answer
196 views

According to documentation change data feed on Databricks support both batch queries and streaming queries. I was wondering if there is anyway to pass the parameters inside the batch queries. More ...
0 votes
1 answer
640 views

I'd like to query an S3 storage containing parquet files through my Spring Java app with Dremio. These are dynamic queries with user given parameters. I use Apache Arrow SQl driver and simply run ...
1 vote
4 answers
129 views

I have a table that looks like (never mind the database vendor as I need this in ANSI SQL): create table edge ( parent_id int not null, child_id int not null, value float not null, start ...
1 vote
0 answers
52 views

Can I use an ORDER BY clause with any SQL data type? For example, will the query SELECT Column1 FROM TableName ORDER BY Column1 return results, no matter the data type of Column1, grouping columns ...
0 votes
1 answer
104 views

Is it defined how a date should be compared to a timestamp with a timezone or a timestamp without a timezone? For example, something like: SELECT DATE '2014-01-01' = TIMESTAMP WITH TIME ZONE '2014-...
2 votes
2 answers
387 views

Let's take the following two queries: select greatest(1, val) from unnest([null]) as val # null And: select sum(val) from unnest([1, null]) as val # 1 My question is why is null handled differently ...
3 votes
1 answer
691 views

Consider the following SQL window query: SELECT LAG(no) OVER (ROWS BETWEEN CURRENT ROW AND CURRENT ROW) FROM account; I'd like to understand what the behaviour should be according to ANSI standard ...
starswap's user avatar

15 30 50 per page
1
2 3 4 5
...
25

AltStyle によって変換されたページ (->オリジナル) /