Query By Example In Database Sql Structure