How to get a separate header. Id from this:
SELECT Title.id, Title.title FROM titles as Title HAVING points > 0 UNION ALL SELECT Title.id, Title.title FROM titles as Title HAVING points > 1
There is more to the request, but that should be enough.
Just uninstall ALL. Some options allow you to add DISTINCTinstead ALL, to be more explicit, but redundant, that by default you always need to filter our duplicates.
ALL
DISTINCT
MySQL - http://dev.mysql.com/doc/refman/5.0/en/union.htmlMSSQL - http://msdn.microsoft.com/en-us/library/ms180026.aspxORACLE - https://docs.oracle.com/cd/B28359_01/server.111/b28286/queries004.htmPostgreSQL - http://www.postgresql.org/docs/8.3/interactive/queries-union.html.
:
SELECT Title.id, Title.title FROM titles as Title HAVING points > 0
HAVING points > 0 - HAVING points > 1?
HAVING points > 0
HAVING points > 1
ALL, .
WHERE HAVING, :
WHERE
HAVING
SELECT Title.id, Title.title FROM titles as Title WHERE (1st query conditions) OR (2nd query conditions)
SELECT Title.id, Title.title FROM titles as Title HAVING (1st query conditions) OR (2nd query conditions)