suiteql to get companyname from entity, not compan...
# ask-stanley-ai
k
suiteql to get companyname from entity, not company name from subsidiary
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems that you can use SuiteQL to get the company name from the entity by querying the
subsidiary
field from the
item
table. However, if you want to exclude items that belong to multiple subsidiaries, you can use a combination of
GROUP BY
and
HAVING
clauses to filter out those items. Here is a sample query:
Copy code
sql
SELECT * 
FROM item 
WHERE subsidiary='A' 
GROUP BY item 
HAVING COUNT(subsidiary) = 1
This query will return all items that belong only to subsidiary 'A'. Please replace 'A' with the actual ID of the subsidiary you are interested in. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.810546935
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.80480969
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.803894103
Please provide your feedback on this answer.