Skip to content

join two tables where unique id is 0 in other table

below are the two tables 1st is media_taxonomy and 2nd is media_taxonomy_map to join media_taxonomy: media_taxonomy_map: here is my sql query here is the result: BUT, I also want the rows in the joined table where media_taxonomy_id is 0 in media_taxonomy_map table is this possible? Answer I am guessing that y…

How sum values in days intervals MySQL 5.7?

I have a server with MySQL 5.7. I have two tables. First one t contains creating dates for each id. Second table t0 contains profit records day by day for each id. I want to get columns with sums of profit for first and second 30 days for each id as well as for the first day. This code runs