I now have multiple tables that generate one table every day from July 1 to December 30, and now my boss asks me to summarize the table contents of each month. The database table is just like in the picture. I wonder if it is possible to use a SQL statement wildcard or even a table statement to list the data of each month separately. What I see is that this daily table is generated by rules. I don"t know which hero can instruct me to thank myself for writing SELECT FROM mas_sms_sent_2018_07_06 UNION SELECT FROM mas_sms_sent_2018_07_09 UNION SELECT FROM mas_sms_sent_2018_07_10 UNION select FROM mas_sms_sent_2018_07_12;. The content is what I want, but I think 30 days means I have to 30 times and then summarize it into July. What if the boss doesn"t like it and asks me to summarize what to do for a year? my stupid method certainly won"t work, so I would like to ask all of you to help me to see if it is best to generate an AS table for July, but my mysql is half a bucket of water. For example, AS table name (qiyue) ][2]