Time to ask from the almighty stack overflow questions again. So my problem is that I am developing in TKINTER and have implemented and integrated 2 tables in one database on the application. I would …
Tag: sql
SQL Report Builder: Issue with SUM in VarChar Column
I’m back with what is probably a very simple question but (as a SQL newbie) I can’t seem to figure it out. I’m basically running a fairly simple report for a hospital. They want a report that details …
Joining three junction tables
my heads hurt from trying to figure this out! I have three tables -Players -Teams -Games Three junction tables with two columns. -player_teams -teams_games -player_games I need to list all Players who …
SQL conditions – select ID who have multiple values in a column
Having this COLORS table: How do I select the ID who have both COLOR RED & PINK? (Could be more than 2 colors) SELECT ID FROM COLORS WHERE COLOR IN (‘RED’) AND …
parse_timestamp vs format_timestamp bigquery
Could someone help me understand why these two queries are returning different results in bigquery? select FORMAT_TIMESTAMP(‘%F %H:%M:%E*S’, “2018-10-01 00:00:00” , ‘Europe/London’) returns …
SQL If statement – check if row count of subquery = 1
Any suggestions on how to do this? I have a complex if statement in a query that needs to check on various conditions for a given table. EG: IF EXISTS (SELECT Labeler FROM [xx].[dbo].[manuf] …
count sequence of particular value
I have a snowflake table like this: date_col | artc | locl | flag d1 | a1 | l1 | 0 d2 | a1 | l1 | 1 d3 | a1 | l1 | 1 d4 | a1 | l1 | 0 d5 | a1 | l1 | 0 d6 | …
Oracle SQL: select for weekday and converting column to date
I’m having a database with column (with datatype VARCHAR20) Created 2020-01-01T20:30:20.207Z 2020-01-04T23:10:00.242Z In the end I want to be able to filter for a certain weekday. My first step in …
Get three last movements of the per ID with LAG and GROUP BY in MySQL
I hope someone can help with this query, I have a requirement for a query that groups the id of the last date, but I want to have three columns with the 3 last movements. So I tried grouping by the id and used MAX(date), and used LAG to get the three last movements, but I’m getting an error from
How to send values to automatic sequential rows in an arrayformula on gsheets?
This would be much easier to solve on the 1* data sheet, but I am trying to have grouped data with a weekly quantity broken down into a daily # to make work easier further down the line. =query({…