I imported a few xml files into my database. I have multiple survery ID's and multiple varname's per survey each with a value.

I have been able to get the results i need but i am not sure if i am doing this correctly.
I am not entirely sure how i would write a query to select out desired survey ids..

```
where varname in ('age') and value >18

```

would give me all survey ids with participants older than 18

but what if i have multiple variables and some are numbers...so i cant just write >18 if i have other variables that are numbers too...

how can i associate the value to that varname?

```
SURVEY_ID   VARNAME VALUE
674078265   PROVID  provider name
674078265   SEX Female
674078265   age 55
674078265   SP  Internal Med
674078265   ID# 12345
674111111   ADJSAMP Included
674111111   PROVID  provider name2
674111111   SEX Male
674111111   age 34
674111111   SP  Surgery
674111111   ADJSAMP Included
674111111   ID# 6789

```