You should tell us about the issue like error message or its related details. I took a glance & found
0) There's no space before
AND
keyword
1) You're filtering query based on dates so you need to use CAST/CONVERT for date related things in
WHERE
condition. OR you should use right
Date format[
^]
2) Use parameterized queries to avoid
SQL injection[
^]
3) Use Google based on the error message