add some requirements
change query because on heroku postgres don't work but localy in Mysql work
fix error of counting NULL as friend