-
select with combinational conditions
Hi, is there a way to make select statements with multiple conditions in combinations?
For example, for the table below:
q)flip `date`data!(2023.05.20 2023.05.20 2023.05.20 2023.05.19 2023.05.19 2023.05.19;`a`c`b`b`b`c) date data --------------- 2023.05.20 a 2023.05.20 c 2023.05.20 b 2023.05.19 b 2023.05.19 b 2023.05.19 c
I would like to select rows with
(date=2023.05.20 and data in `a`b) or
(date=2023.05.19 and data in enlist `b)
i.e. the results should be
date data --------------- 2023.05.20 a 2023.05.20 b 2023.05.19 b 2023.05.19 b
I have a list of these dates/data combinations, is there an easy way to do such filter?
i.e.
2023.05.20 `a`b
2023.05.19 enlist `b
2023.05.18 `c`d`a
2023.05.17 `d`a
…
Thanks.
Log in to reply.