Skip to content
Advertisement

Using if-then or case-when-then to select from dataset

I have a dataset with students in 1st, 2nd and 3rd grades. I want to select the names of all students in 1st and 2nd grades, but only students named John, Jane or Smith from 3rd grade. Here is what I have so far:

I’m not sure what I’m getting wrong there but I’d appreciate some help. Thanks

Advertisement

Answer

You can UNION two queries such as this:

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement