python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
For how many customers was this the first-ever merchant they ordered with? SQL question
I am struggling with this sql question:
For each merchant, find how many orders and first-time orders they had. First-time orders are meant from the perspective of a customer and are the first order t...
milkeyyy
Votes: 0
Answers: 1
MySQL Select where in array of statuses and last occurrence equals specific value
Let's say I have a table like this:
id user_id status updateded_id
1 1 yes 2/5/2013
2 2 no 2/1/2013
3 3 yes 1/28/2013
4 2 yes 1/24/2013
5 2 n...
matisa
Votes: 0
Answers: 3
How to handle ties in SQL
SELECT
employee_id,
department_id,
first_name,
last_name,
hire_date,
job_id
FROM employees e
WHERE hire_date IN
(
SELECT max(hire_date)
FROM employees
...
PySquirrel
Votes: 0
Answers: 2
MySQL query for lowest price for majority of prices in table
I'm trying to build a query where by I can extract the lowest price in the table, where the price is at least 10% or more of all the prices in the table.
I understand I can use MIN(price) to get the b...
ACKA
Votes: 0
Answers: 1