You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our Cosmos Db Container for Doctors is partitioned by networkId. Each Doctor document has id, fullName, npi, providerType, gender and then there is an array of offices the doctor is working for that networkId.
I want to write a query using Group By clause where I want to gather all offices under all networkId partitions for a given doctor's npi.
I am trying something like this and need help writing something which can help my goal:
SELECT DISTINCT c.fullName, c.providerType, c.gender, c.npi, [c.offices] as offices
FROM c
WHERE c.npi = 'something'
GROUP BY c.fullName, c.providerType, c.gender, c.npi
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Our Cosmos Db Container for Doctors is partitioned by networkId. Each Doctor document has id, fullName, npi, providerType, gender and then there is an array of offices the doctor is working for that networkId.
I want to write a query using Group By clause where I want to gather all offices under all networkId partitions for a given doctor's npi.
I am trying something like this and need help writing something which can help my goal:
Beta Was this translation helpful? Give feedback.
All reactions