I have run into an issue which I haven't been able to figure out yet. I have two MySQL tables with similar data and I want to return all the data from both tables based on a userid and timestamp. How would I construct the query to accomplish this...examples of my two tables are below.
Counts1 table: user_id, start_date_time, end_date_time, count_type
Counts2 table: count_by_ids, start_date_time, end_date_time, count_type
user_id from Counts1 table contains similar users as what is located in Counts2 table count_by_ids. All user_ids or count_by_ids may not be in both tables, so I need to return all of them with them arranged in descending order by either start_date_time.
Any help is greatly appreciated.
Thanks,
Boochy
Counts1 table: user_id, start_date_time, end_date_time, count_type
Counts2 table: count_by_ids, start_date_time, end_date_time, count_type
user_id from Counts1 table contains similar users as what is located in Counts2 table count_by_ids. All user_ids or count_by_ids may not be in both tables, so I need to return all of them with them arranged in descending order by either start_date_time.
Any help is greatly appreciated.
Thanks,
Boochy