Hello All, Good Morning! Can we list only record ...
# gooddata-platform
g
Hello All, Good Morning! Can we list only record id using MAQL. E.g. I have one table name as User and I want all active users ids like below SELECT id FROM User WHERE status = active Expected output of query : 1, 2, 3, 4, 6 etc. How can I do this using MAQL ?
m
The MAQL itself always returns numbers - values of metrics somehow calculated. It will not return values of attributes. But you can get a list of attribute values with some property by using this attribute in an insight together with a metric (or a filter). So in your case you can do this: • put the id into the insight • add a filter for attribute status to that insight and select the value "active" or • create a metric
SELECT COUNT(id) WHERE status = active
• use this metric in an insight together with the attribute id