I have some calculations where a normal LAG function would solve it for me, which Ive tried. However. My question comes with an exception. Every january and july the value resets to 1500. On row nr 2 …
SQL Join tables with no unique values
I am trying to create a table for a game that shows some player and team stats so I can compare them. The two tables look like this: year player team patch game result …
Rounding script works to the nearest 15 minutes based on duration, how to shift this threshold by negative 30 seconds for decimal hours
I have a script which rounds a time length to the nearest 15 minutes. So for example 00:23:00 minutes to 00:37:59 duration will return 0.5 (decimal 30 minutes) etc continuous around the clock. I am …
How can I get the division of two group by on SQL?
I’ve seen several posts to get the percentage of each row (using partition by), others about getting one row divided by another (using inner join with the same table), but I haven’t seem this problem, …
When issuing a command to MySQL, I’m getting that error “#1075 – Incorrect table definition;”
CREATE TABLE onscreen( id int(2) not null AUTO_INCREMENT, subject varchar(100) not null, content varchar(100) not null, date datetime not null );
Esper: group by value in a named window and use this grouped value to determine the output id
I want to create a named window that takes the last 20 seconds of speed settings (1-10) and power outputs (float). Then I want to query this to get the average power per speed setting (from 1-10). For …
Is there a way to return non existent values when using groupby and union all?
I have a table that I’m trying to return summarized results from for a chart that will have two datasets, one for debit transactions that have happened each month and one for payments that have happened each month. The table I’m querying looks like this: What I’m looking to get back out of m…
Parse out Y-M-D from Y-M-D H-M-S UTC sql bigquery
I need to parse out ‘%Y%m%d’ from the column in BigQuery. My data looks like this: I have tried the following: The error message: No matching signature for function PARSE_DATE for argument types: STRING, TIMESTAMP. Supported signature: PARSE_DATE(STRING, STRING) Desired output: 2000-09-25 Answer W…
SQL – concatenate strings in variable while loop with +=
I can’t concatenate in this example bellow! When I loop I get my 2 correct results. When I concatenate @MaterialCompositionEn += ‘, ‘ it works fine When I try to concatenate @MaterialCompositionEn += same query to get the 2nd row, I have a null! Result: Now when I change to: I am expecting 2…
concatenating large number of tables in sas
let’s assume i have a large list of tables say : all these tables have the same column names and number of columns, i want to stack all these tables one under the other in one dataset i tried to create a macro to do so (because i have multiple other lists that are larger than this but up until