I have three tables, we'll call them table1, table2, and table3. Lets say each table has a user id column and a date column. What i'd like to do is to be able to count the number of rows with a specific user id in table1, and sum it with the number of rows with that user id in tables 2 and 3.
I'd then like to take that first query I did which has all rows with the user id, and then take out and count the ones where the date column is greater than a certain date (unix time).
All I'd like to receive in the end is two things. The number of rows in tables 1, 2 and 3 that have the user ID I was looking for summed together, and the number of rows in tables 1, 2 and 3 that have the user ID I was looking for while also being after a certain date summed together.
What's the most efficient way of doing this?
Thanks!