Query Editor
2 min
description: Getting Started with Data DistillerQuery Editor #query-editor
v

Now that we have confirmed that we are all connected, let’s begin the exercise. You have been tasked with joining customer profile data with event data that are stored in two separate datasets in AEP and need to use Data Distiller to join this data into a single dataset.
You will run a query to retrieve CRM ID, loyalty tier points, city, country, loyalty tier, and loyalty points from the customer profile dataset. The data will be filtered to include only Gold-tier customers and sorted by the highest loyalty points to prioritize the most engaged members.
SELECT
_adobedemoamericas275.customerDetailsABC.crmID,
_adobedemoamericas275.customerDetailsABC.loyaltyTierPoints,
homeAddress.city,
homeAddress.country,
loyalty.points,
loyalty.tier,
person.name.firstName,
person.name.lastName,
person.birthDate,
personID
FROM
hol_customer_profile_dataset_abc
WHERE
loyalty.tier LIKE '%Gold%'
ORDER BY
loyalty.points DESC;