Questions tagged [sql-max]
18 questions
-1
votes
1 answer
Combine Duplicates from SQL Union into One Row Per ID
I have the following query which collates data from a few tables and produces results in the following format:
id | name | email | surname | last_updated | phone | phone_no | birthday |…

Alk
- 5,215
- 8
- 47
- 116
-1
votes
2 answers
Numbering invoices yearly and different structures with SQL and PHP
I'm a beginner in SQL and I tried looking for an answer without any luck.
I would like to generate invoice numbers automatically with the following distinctions:
I have 2 different structures invoicing
I would like to avoid any numbering issue, for…

TheGix
- 108
- 1
- 8
-1
votes
3 answers
Show only the MAX values on count in SQL Server
I have the below problem:
SELECT
B.ISBN, TITLE, COUNT(Rate) AS NumberOfRatings
FROM
bda.books AS B
LEFT JOIN
bda.booksRatings as BR ON B.ISBN = BR.ISBN
GROUP BY
B.ISBN, Title
I wrote this query, and I want to get only the…

Luciferinos
- 1
- 1