From_db in sql queries