Erro!

# 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT * FROM tb_visitas WHERE ip='34.229.24.100' AND data LIKE ('2019-07-18 01:' at line 8

SELECT tb_agendas.*, DATE_FORMAT(tb_agendas.data1,'%d/%m/%Y') as data1 FROM tb_agendas WHERE 1 SELECT * FROM tb_visitas WHERE ip='34.229.24.100' AND data LIKE ('2019-07-18 01:%:%') ORDER BY data1 DESC LIMIT 100;