OK, I have a single table with keys and values that I need to query and order from that looks somewhat like this:

Let’s say I want to pull all distinct items (resource_no) that are in the webcategory of “dog” (and any other values) and order them by “order” in ascending order so that my result is this:

I can’t figure out how to query my table to allow this…I have tried inner joins but they do not seem to work…can anyone help? Thanks!
Kind of tricky to read when it’s all in separate rows n the same table, but this should do it for the values you have now. If you’re thinking dynamic columns, you’ll need to go database specific procedures.
Demo here.