I am not sure if what I want can be done but basically, I have a homework where I am supposed to come up with sql statements to filter through a database of a made up TCM company in any way. I wanted …
Tag: sql
Using generate_serires with partition by generate triple duplicate row
I have a table which look like this: dt type —————————– 2019-07-01 10:00:00 A 2019-07-01 10:15:00 A 2019-07-01 11:00:00 A 2019-07-01 08:30:00 …
SQL Return last record where column value changed and amount of change
In MS SQL 2012, I have a table like such: Key | Entity | Value | DateTime ———————————————————– 10 A 800 …
Query null values
I have the column deletedTime in my instances table. Now I want to check in ColdFusion if the value is null. There is only one record to be printed out with the query. IsNull(test) is returning the …
How to use PIVOT on SQL with additional criteria like colum count check and grouping?
Present output of the below SQL query is : Time | SumValue(CE+PE) 2 columns – ensuring the number of output is exactly ten. How can I transpose it to : Time | CE1Value | CE2Value |… |…
SQL query to get minimal sum value and associated column from table
I have following tables: t1 – Items | Id | Item | | 1 | I1 | | 2 | I2 | t2 – Item_elements | Id | Item_id | Element | Our_quantity | Client_quantity | | 1 | 1 | E11 …
Is Power BI Best Practice to Group Data in the SQL Query Before Importing even though this may effect how you write some DAX expressions later?
I’m importing data via SQL import to a Power BI data model. If I group the data I can save the import 100,000 rows, but it effect the way I write my DAX queries to get the correct answer (and makes them slightly more complex). I’m after the general best practice for where to group data, pre import…
mysql query between days and calculate days between dates
i need to get the id and days count between days. my query is i need output as please help me. Answer GREATEST returns max value from list, LEAST – min
how to get the output of this SQL query in python language
i want output which this query gives but in python code i am trying to groupby and i am getting name of groups .how to get values like it gives in SQL query Answer SQL: Python:
Sum variables when condition is met in sql
I have a table mes_transaction where I have variable dc – it’s either DEBIT or CREDIT. I am writing a sql procedure for another table(if I can say so). In the other table mes_aggregated_trx I have trx_amt – transaction amount variable. Basically what I need to do is to write a procedure that…