I have the following orders table: Here's a Fiddle: http://sqlfiddle.com/#!17/71698/3 I would like to get the sum of revenue by product among thos ...
I have the following orders table: Here's a Fiddle: http://sqlfiddle.com/#!17/71698/3 I would like to get the sum of revenue by product among thos ...
Is there a way to shorten this query? This query returns the result I want but I feel like this is to long. Are there tips to make an efficient query ...
I am looking for a MySQL query to count how many people visited a web-app. I have a database storing information about visitors, they type and when th ...
I am using MariaDB. I want to have two count results in a query. The first query is: SELECT license_key, COUNT( * ) AS expired FROM licens ...
I have a sqlite database containing a table who looks like this, to store many to many relation : ID_1 ID_2 TOOL ...
I have a table like this: id status grade 123 Overall A 123 Current ...
I got a table with 2 columns app and grupo_id select count(*) total, app, grupo_id from devices d group by app, grupo_id ; output: ...
Let's say I've got some data with two columns: name and ice cream purchases. What I want to do is get the count, grouped by both columns. I know ho ...
I have a query that is meant to get the count of each reaction on a comment and whether the user is one of the people who made that reaction. However, ...
How to count the total project participation (it means the project count) for the project Name Lakers and participate in Client meeting between 12/25- ...
Below is the SQL I use to create my pivot table. I need to replace null values with '0', however, I get an error when trying to use a case expression ...
I have some data in x2 tables (d and i) that I want to join and split 1 table's data (i) in to 2 columns depending on data in another column of table ...
I am having trouble with a SQLite query and I've tried googling it over the last few days, but I don't even know what the operation is called to come ...
I new to postgresql and I am trying do calculate a rate in a table like this: I want to calculate the total count of sold phases / total like this: ...
The VISITS table USER_ID VISITED_IN 518 2022-04-13 20:37:04 518 2021-12-29 22: ...
I've below data in table, val1,val2,val3 are of double type. x represents record is having old value and y represents new value. So we need to concate ...
I'm trying to combine single rows from multiple records into several columns in one record. Say we have a database of people and they've all chosen 2 ...
I am trying to do 02 COUNTS in same table, using WHERE and GROUP BY, but the result of the last column is coming wrong... Thats the command SQL which ...
Currently I have an orders table that is formatted with a row per month: id order_month order_count order_sum ...
I have made a query that extract the two newest lines per product. Each row shows id, productnumber, pricechangedate, price. Id ...