Single select from template record oracle

oracle

Due to lack of terminology in my head, let's say I've got 1 record from users table with these attributes :

Name   | Surname | Height | Weight
Person   X         6,2      190

How do I find other users with same height and weight as a person x with single select?

Update:

I have this on me now :

Select *
from users
where height = (select height from users where name = 'x')
and weight = (select weight from user where name = 'x');

Can I somehow fire this inner query once, because I'm reusing the same db record?

Best Answer

You can just join the table on itself using a table alias;

This does the trick:

Select u1.*
from 
     users u1
     inner join users u2 on u1.weight = u2.weight and u1.height = u2.height
where u2.name = 'x'