0
Next, I need the amount per month of each customer who entered the year managed to do this, however I want q be shown in only 1 result. How do I join the two SELECTS? In order that it is added to the right side of the first result "Input Month Year" the fields "QTD" and "Output Month Year". See the image I sent.
Thank you in advance!
NOTE: Both are part of the same table are only in different columns.
NOTE: I tried to use UNION but UNION it just groups the results in 2 fields and deletes the field "Output" tried to do a subquery (unsuccessfully).
I probably didn’t understand your explanation of the purpose of your query but perhaps a FULL OUTER JOIN of these two queries about the month/year field can provide the desired result.
– anonimo
Put the code to create your table to try to reproduce here. You don’t need all the data, just a part... And puts your SELECT in text form as well, not image.
– Leticia Rosa