Hey, I think we can do this,
select name, breed,adopted_on from dogs d inner join owners o on d.owner_id = o.id where d.adopted_on >= ( select max(adopted_on) from dogs where d.owner_id = dogs.owner_id )
`
Very interesting! That works too! I never thought to have another query in the where clause for comparison.
d.adopted_on >= ( select max(adopted_on) from dogs where d.owner_id = dogs.owner_id )
Yeah, you can check the full syntax here dev.mysql.com/doc/refman/8.0/en/se...
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey,
I think we can do this,
`
Very interesting! That works too!
I never thought to have another query in the where clause for comparison.
Yeah, you can check the full syntax here
dev.mysql.com/doc/refman/8.0/en/se...