Skip to content

Tag: sql

Count nested records in SQL query

I have a problem that I need to select all owners who have 2 different companies where each company is on 2 different projects. For example : I tried to do like this : But it did not work. How to use a SQL query to solve this problem? For this case above, the query is expected to return: Answer

Cosmos db sql query for search in array

I have a document structure like below and I try to implement searching for user by fields author and partNames, so user can do query like SELECT * FROM c WHERE CONTAINS(c.author, ‘John’) and user will get in result the id=1 document because the name of author was John. The next step is to allow u…