When I use $query object multiple time in a function
Please check the screenshoot
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* FROM wp_incf_monthly_report wp_incf_monthly_report WHERE student_id = 3 and (' at line 1]
SELECT , FROM wp_incf_monthly_report wp_incf_monthly_report WHERE student_id = 3 and (date BETWEEN '2020-10-01' AND '2020-10-31') and (post_date BETWEEN '2020-10-01' AND '2020-10-31')