**Full Query:**

```
{[tier;company;ccy; startdate; enddate] select Deal_Time, Deal_Date from DEALONLINE_REMOVED where ?[company = `All; 1b; COMPANY = company], ?[tier = `All;; TIER = tier], Deal_Date within(startdate;enddate), Status = `Completed, ?[ccy = `All;1b;CCY_Pair = ccy]}

```

**Particular Query:**

```
where ?[company = `All; 1b; COMPANY = company], ?[tier = `All; 1b; TIER = tier],

```

What this query is trying to do is to get the viewstate of a dropdown. 

If there dropdown selection is "All", that where clause i.e. `company` or `tier` is invalidated, and **all** companies or tiers are shown. 

I am unsure if the query above is correct as I am getting weird charts when displaying them on KDB dashboard.