In many cases, Administrators need to see the full picture of customer activity. While standard reports only show customers with transactions, sometimes it is just as important to know which customers do not have any transactions yet. Likewise, you may encounter transactions that are not linked to a customer at all.
A Full Outer Join in SuiteQL makes this possible by returning all Customers and all Transactions—whether there is a match between them. This approach is especially helpful for identifying gaps, such as:
- Customers who have not made a purchase.
- Transactions missing customer links.
- A complete dataset for auditing and analysis.
Query Example
SELECT
customer.id AS customer_id,
customer.entityid AS customer_name,
transaction.id AS transaction_id,
transaction.tranid AS transaction_number,
transaction.trandate AS transaction_date,
transaction.foreignTotal AS transaction_total
FROM customer
FULL OUTER JOIN transaction
ON customer.id = transaction.entity
ORDER BY customer.entityid, transaction.trandate
- Returns all Customers, even those with no Transactions.
- Returns all Transactions, even those not linked to a Customer.
- Helps admins quickly identify inactive Customers or unlinked Transactions.
To easily execute a SuiteQL query, see NetSuite Admin Tip | Running SUITEQL Using a Suitelet
The sample code described herein is provided on an "as is" basis, without warranty of any kind, to the fullest extent permitted by law. Oracle + NetSuite Inc. does not warrant or guarantee the individual success developers may have in implementing the sample code on their development platforms or in using their own Web server configurations.
Oracle + NetSuite Inc. does not warrant, guarantee or make any representations regarding the use, results of use, accuracy, timeliness or completeness of any data or information relating to the sample code. Oracle + NetSuite Inc. disclaims all warranties, express or implied, and in particular, disclaims all warranties of merchantability, fitness for a particular purpose, and warranties related to the code, or any service or software related thereto.
Oracle + NetSuite Inc. shall not be liable for any direct, indirect or consequential damages or costs of any type arising out of any action taken by you or others related to the sample code.
We’d love to hear how you integrate SuiteQL into your NetSuite processes! Share your insights and experiences in the NetSuite Admin Corner.