Dropdown selector for All or specific value


I have a table of items that looks like the following:


I also have a redash page in which I can view data about these things, based on the id of the item:

SELECT * FROM other_table WHERE other_table.fk_item_id = ‘{{ item_id }}’;

where item ID is set from a query based dropdown list:

SELECT name AS name, id AS value from items;

This works well in that I can see information for each individual item, as I select them.


However, I also need to see the same information aggregated across all the items, no matter the ID.

What is the canonical way to do this in Redash?

I’ve already tried the following:

  • Build a comma-seperated list of IDs so I can do an IN query. This fails as Redash cannot rename the result column to “value”. (All other names work. For “value” i get “0”, for everything else I get “1,2,3,4,5”, etc.)
  • IF / CASE queries also seem to be of not much use

Any suggestions more than welcome.

There’s a complete example of this here: