dear all dev,

how can i make query in model with conditions from another table

thanks