I have table just like this :
p_central_ticket ================ - t_id ======> id ticket - t_open_by ======> name that raise the ticket - t_closed_by ======> name that closed the ticket - t_open_time ======> open ticket time - t_closed_time ======> closed ticket time
How should i do, if i want to show the Count all tickets that closed by name, and closed time today, weekly, monthly and yearly ? Just like this :
Name today weekly monthly yearly ================================================================= test1@random.com 2 10 70 1000 test2@random.com 5 14 60 1234
Sample data :
t_id t_open_by t_closed_by t_open_time t_closed_time =========================================================================== 1 amir@random.com test1@random.com 2018-03-28 2018-03-29 2 tiki@random.com test1@random.com 2018-04-28 2018-05-29
Need Help guys... Thanks
#mysql #sql #database