Question about a specific MySQL query via Budibase #10186
Replies: 1 comment
-
Hey @anuragbhatia, A little confused by this question. Are you trying to pull all unique records from your mysql table? If so it would be something like the below:
If you are trying to only pull out the first unique Item of each ix_id, I would recommend using DISTINCT. Example below.
Lastly I would like to mention there where so many issues with the sql query you provided. It had typos, additional letters in variables incorrect clauses etc. Fixed version is below. I don't see any reason why excluding records in this way would cause issues!
Hopefully this helps! |
Beta Was this translation helpful? Give feedback.
-
Hello,
I have some data (putting a simpler example to explain issue I am facing)
Now I need to design an interface which can compare these based on ix_id. Thus input should take ix_id's to compare and give non-common output. So output here can be:
I am able to achieve this using something like
select ix_id,City from table WHERE ixi_id=100 AND ix_id NOT IN (select ix_id =101)
and vice versa in MySQL directly.And what makes this complex is that I want to do this comparison for n number of items i.e say 10-20 or so. Would greatly appreciate if someone can throw light on what I should be using here with budibase.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions