I’m new to sql so it might not be too difficult for some of you but I simply need to find the length in years between a column displaying different dates and todays date. I’m not too sure what i’m …
Tag: sql
Case statement help for replacing null from multiple joins
so i have the following case below where if jl name does not have n/a i want it to come from the same column. if there is n/a i want to look into this subquery and find the recent jl name. but if the …
AWS Athena custom data format?
I’d like to query my app logs on S3 with AWS Athena but I’m having trouble creating the table/specifying the data format. This is how the log lines look: 2020-12-09T18:08:48.789Z {“reqid”:&…
What is the use of ROLES in Azure Syanpse if I cannot add any USER to it?
I am creating users, in particular, login_id in Azure synapse using Admin login id and password. As of now, I have to give permission individually to every login using the code below. (brown_batman is …
Find common values in many tables
I have 5 tables and I want to find the common values between them in one column. The column name differs in two tables(account_number, account,account_id). select * from db.table1 as a INNER JOIN db….
Is it possible to sum up time field in SQL Server?
I have 3 time(0) column in 1 row. I want to calculate arrival-Time column automatically and this is result of the sum of Departure-Time + Duration is it possible with trigger or computed area method? thanks in advance Answer SQL Server does not support direct addition on time values; however, you can use dateā¦
How to select an element just once in plain SQL
I’ve seen other similar questions to mine, but I haven’t found one that could actually help me. I have a table, defined like so: CREATE TABLE “DOWNLOAD_HISTORY” ( “ID” …
SQL query to select from multiple tables and create third table
Can someone please help me with a SQL query? My apologies if a similar question has been asked before. Finding it difficult from other examples I have seen. I have 2 tables and would like to create a …
How to filter json in PLSQL?
My data look like: CLUID EVENT_PAYLOAD STEP 1998-06-22-23.58.16.792243 {“type”:”page”,”name&…
Select on value change
I have a table that looks like this in a MySQL database: I would like to select all lines where the Batch_Num is different from the previous value including the first one: Is there a keyword maybe to access the previous line to compare the to the current line? Or some other way to compare a line to the line