sqldevuser·7 ปีที่แล้ว·discussHere is a single query to get you both solutions. https://pastebin.com/P7LN9jMzThis was after I solved it the old fashioned way though :)