Output of UNION query UNION
Suppose 2 SELECT queries are joined by UNION. Can I get output if the 2nd SELECT query has 0 rows and 1st SELECT query returned some rows?
Yes, you will have output even if only 1 of the SELECT query has results. 

Though by default, you cannot determine if the result was from the 1st or 2nd SELECT query, you can include an additional column in each query to determine where in those SELECT query the result came from. See this example