-- 4734570.8343 That query gave me the result for the average amount of sales for each salesperson. This query gives me the exact results I'm lo ...
-- 4734570.8343 That query gave me the result for the average amount of sales for each salesperson. This query gives me the exact results I'm lo ...
I need to select the users who have won at least 1 round in all of the different competitions. I have the following table sctructure: results ...
I looked at a similar question and read the documentation on the average function, but when I tried: which puts AVG after score, I get There ar ...
As with most programmers, I want to be efficient in my code. In this case, I want everything in 1 statement rather than broken up into many parts. I ...
I have students work system. Each student can submit multiple assignments, and the assignments are either written or practical. For each student, I ne ...
I have a products table with following values with id as INT and profit as numeric data type I want to fetch id's which have profit more than avera ...
I'm using SQLite, and would like to get only rows with values that are unique per table. I know how to get values per each column, but can not create ...
I'm looking for the maximum purchase amount order in the range 50$ and 200$ by combination of each customer and order date. For 2 different queries I ...
I have the following code (see below) that finds the minimum date of birth of an employee. I don't understand why does it throw the error: An agg ...
[Source: Hoffer et al Modern Database Management 13 ed., practice question] The SQL statement apparently cannot display sales for state = 'MA' for ...
I have this tables: I am trying to get the series and seasons in which the sum of the salaries is less than 4000, and if any season of a series has ...
I have two tables in MS Access, with non-unique id's, dates and qty: TABLE_IN id date qty name ...
I have a table called traffic shown below. I have to write a query which list all the protocols for which incoming traffic is higher than outgoing. Th ...
I have two separate tables from two different databases that are performing a matching check. If the values match I want them out of the result set. ...
Here is my SQL Script to get the 2 records only having Min. & Max. length of city Why it is returning all the records? It should return only ...
I have been trying to write a query using INNER JOIN and CASE WHEN with SUM to find the movieName where all personnel that are cast in the movie are n ...
Is it possible to use two parameters in HAVING clause using MAX ? Or I need to create some variable ? The problem is that I have two columns: date_id ...
I found this syntax in a online course. I do understand it. But how it works? I do not understand the HAVING COUNT (*) > 1. Does it mean count the ...
I am trying to learn SQL, and I am doing a project based on a provided database about past Superbowls. I wrote the below code to try to return a "yes" ...
Suppose I'm writing as query for the aggregate functions where I want result based on some conditions both on the column of the table and on aggregate ...