this is related to my previous scenario. I have a dataset like this: Aside from outputting the timestamp in which a user first committed a failure, and consecutively commits a failure status every day, leading up to today (2022-04-29), I also want to output the non-consecutive block of days in which Karl or Andrea commits a failure. In this case,
Tag: data-analysis
The Sum of people that have same age in SQL?
I’m taking a SQL class and I need help with a question. I have the following table on a phpmyadmin server with a total of 100 patients I’m told to find the sum of people that have same age using SQL. I wrote this query: but it returns 100 as a result and when I did this query and found
Is it possible to get active sessions per hour in SQL?
start_time end_time HostID gameID 6/14/2021 20:13 6/14/2021 22:22 1 AB1 6/14/2021 20:20 6/14/2021 21:47 2 AB2 6/14/2021 20:22 6/14/2021 22:07 3 AB3 6/14/2021 20:59 6/14/2021 21:15 4 AB4 6/15/2021 21:24 6/15/2021 22:09 1 AB5 6/15/2021 21:24 6/15/2021 21:59 2 AB6 6/15/2021 23:11 6/16/2021 01:22 4 AB7 6/16/2021 20:13 6/16/2021 21:23 3 AB8 I have a table that has a start
Analysis of the completeness of the availability of products from the ClickHouse SQL database
Documentation: https://clickhouse.tech/docs/en/ Goal: 85% of the brand’s product range should be available for purchase Calculate the number of products of each brand by availability (maxItems > 0)…
Calculate Time spent by users on the platform
I’m trying to calculate the time spent by users on my platform on a weekly basis. I have the following api_request_logs table (*Note: each row is duplicate) I tried this query, however, it doesn’t seems it is outputting correct calculation . Current output: Desired output : What I’m doing wrong or do you have a better idea to do it?
Column X which is neither GROUPED nor AGGREGATED – StandardSQL / BigQuery
I’ve been reading posts about this and the so many suggested solutions didn’t work as I want. I’m trying to get the sum of some columns for the same rows then selecting all the other columns when …
Aggregations in SQLite
I am looking to construct a SQL query which is able to sum up installment values by month. Ordinarily this wouldn’t be too hard as you would simply sum the installment values and group by month. …
SQL Server datasets [closed]
I would like to know if there are any SQL Server ready datasets which one can use. I know there’s AdventureWorks (which i’m already using), but i would like to know if there are more. I also open for …