Sccm SQL/wql query for last patched date and reboot time

Hi guys, trying to run a SQL query using quick fix engineering to get last 1 month patched details for a specific collection, but I am not able to sort last 1 month, it’s showing all data…can anyone help with the query..