Questions tagged [sql]

Structured Query Language (SQL) is a domain-specific language used in programming and designed for managing data held in a relational database management system (RDBMS), or for stream processing in a relational data stream management system (RDSMS)

Filter by
Sorted by
Tagged with
0
votes
0answers
4 views

Creating a Filtered Data Extension based upon a list

I'm trying to filter a data extension where the information pulled in is equal to about any of about 1,000 customer IDs. Is there a way to mass filter a data extension based upon a single customer ...
0
votes
0answers
23 views

Can someone help me with a query

I am sending an outgoing SMS message to customers three hours before an appointment, my test contact is flowing through the entire journey properly but I'm not getting the text for this journey. I ...
0
votes
0answers
10 views

connect two data extensions without a common PK

Every Customer has a CustomerID, sku, userID and sessionID I have two data extensions that I want to join so the CustomerID links with the sku, userID and sessionID First (table name) sku(pk) userID ...
0
votes
0answers
11 views

How to use more than two sub queries in SFMC SQL

I have a query which is successfully running in HIVE database. This query have around 6 subqueries. I need to rewrite same query in SFMC SQL, so for the sake of testing purpose I just worked on two ...
0
votes
0answers
35 views

Unique Deliveries by Month from a specific DE

Is there a way to know the number of unique deliveries by month. In my context i have a master data extension and the users creates others filtered data extension, but with the same SubscriberKey. ...
0
votes
0answers
25 views

SQL to find user's who received a sale in last 30 days

I am trying to run a query where I would like to find users whose last order received date is within last 30 days. NOTE - Here I am using an inner join only to get the "First Name" field from a ...
0
votes
1answer
36 views

Date format in SQL query

We need a specific format date to personalize our emails, for example, the US date format is MM/DD/YYYY HH:MM:SS and we need to display DD/MM/YYYY. Is it possible to change the date format directly ...
0
votes
0answers
9 views

How to query data views in Child Business Unit?

Can someone please help me on this? I have a scenario where I need to query the child business unit data views from child business unit. When I'm trying to query on _open or _click data views it ...
0
votes
1answer
55 views

Attempting to run an SQL Query to pull in information based off of most recent update date

I am attempting to run an SQL query to pull in all most recent records based off of last modified date. Here is my query and it giving me an error of Automation failed due to a system error. Any help ...
1
vote
2answers
38 views

Customer Mobile Push Details Extract

We have a requirement to send mobile push messages from the data extensions as we need to segment data and put in the data extension.The data extension have only contact key.We need to export the ...
0
votes
0answers
32 views

Get the most recent open date through an SQL query

I have trouble with my query to get the most recent email open date. This is my query: Select distinct (SubscriberKey),EmailAddress, max(OpenTime) as OpenTime from unique_opens2 WHERE OpenTime > ...
0
votes
1answer
29 views

SQL to get the most recently created record based on Datetime from Data extension in SFMC? [closed]

How to get the most recently created record based on datetime using SQL in marketing cloud? Sql: SELECT TOP 1 Name, Email, DateTime FROM DateBasedDE ORDER BY DateTime DESC
2
votes
1answer
50 views

Can i update data extension with auto generated random value

I want to run an automation for adding random value into data extension field. I have data extension with name RecordsDe which having 3 field FieldA, FieldB & PKey. Now i want to add random ...
1
vote
1answer
26 views

Need to find engagement from existing Data Extension

I have a Data Extension in SFMC where I've captured customer purchase data, let's call it "cust_purch_12mo" and right now it only contains the customer email address and purchase date. I am trying to ...
2
votes
2answers
66 views

Can i get latest record from data extension having duplicate records

I am updating my target data extension from the data extensions having multiple records by using sql query by union all in automation studio of marketing cloud. my query is SELECT FieldA, ...
-2
votes
1answer
43 views

SQL Query to Find JobID

I am looking to write an SQL query to find the JobID for journey sends. Any help would be appreciated. Thanks in advance!
-3
votes
1answer
36 views

SQL query to track non openers in the last 90 days (Marketing Cloud)

Wondering if anyone would be able to help me. I need to build an sql query in Marketing Cloud that allows us to track anyone who hasn't opened an email within the last 90 days. We have tried to use ...
1
vote
1answer
35 views

SQL query to group EventDates by day of week

I'm trying to write a query in Marketing Cloud that will filter for an event (specifically a unique open) that took place on a specific day of the week. So for example, my query would answer the ...
0
votes
1answer
38 views

Update Data Extension excluding Null values

we have a data extension which needs to get updated from a real time sync through salesforce, Right now we are using a Staging D.E to store the data and then update it to our desired D.E. But the ...
1
vote
1answer
32 views

Marketing Cloud: pulling bounces at business-unit level

We would like to pull all the bounces from a business unit via SQL to a single target data extension. The target DE has the following data columns from 3 data views DEs (_Subscribers, _Job, _Bounce): ...
0
votes
2answers
32 views

Is it possible to update data extesnion from the another data extensions having different no of fields?

I am having 4 Data Extension with different number of fields but 1 field that is common in all(EmailField) is my primary key. I want to update my 5th Target Data Extension with the data that is in ...
-2
votes
0answers
16 views

Need to update email changes and status in all subscribers list in Exacttarget Marketing Cloud

Based on email optin and email changes I need to update all subscribers list in marketing Cloud. I.. e. If email optin is false then status unsubscribed and if true then it should be active . We have ...
3
votes
0answers
45 views

Print reason for SQL query failing in SSJS

I built a Microsite which staff can you use to run one-off queries without having to create an activity and then run it or place it in an automation. It works great but is very basic - when you click ...
-4
votes
3answers
70 views

Update Data Extension by using SQL Query in Automation Studio of Marketing Cloud

i am new to Marketing Cloud i am just learning it, i want to do the following things: I am having 4 Data Extension De1, De2, De3, De4 De1 having 4 fields(fieldA, fieldB, fieldC, fieldD) De2 having 2 ...
-1
votes
1answer
27 views

How can i update Data extension using SQl in MC Automation Studio

Hi i am trying to achieve SELECT name, email(primary key) FROM DeOne, DeTwo Update DeThird Fields are same in all 3 Can Someone correct me
-1
votes
1answer
43 views

How can i update my master data extension from another data extensions in marketing cloud

I am having as data extension name as MasterDe and i want to add and update it with the data that is in other data extension named as DataDeA, DataDeB and DataDeC. All these Dataextension having two ...
0
votes
1answer
37 views

Query to select all subscribers who have received Email from specific DE

Sorry in advance if the question is repeated, but i have a goal that i want to know how many emails the subscribers from a specific DE received in last and each month. I tried to use the sintax ...
0
votes
0answers
27 views

Marketing Cloud Tracking Exports to Data Extensions

I have a multi-business unit marketing cloud setup and I am trying to extract individual email send data to an external website. I tried to look up querying this data from within automation builder ...
-1
votes
0answers
22 views

I need to increase code coverage, I have 33% and I am getting no code coverage for the Contact SOQL

public class UpdateContactfieldsonthebill{ public static String getAccount(loan__Loan_account_Due_Details__c a) { Account a1 = [SELECT Id, Name, CurrencyIsoCode FROM Account WHERE Name =: ...
0
votes
1answer
34 views

Special Characters replaced in data extension with SQL Query

I used a series of queries in automation studio and filter activities in automation studio. What I did: Using SQL: copied my original data extension into a new one, added a new column and used a case ...
0
votes
1answer
27 views

Problem with SQL (Conversion failed when converting the nvarchar)

I have a problem with the sintax below where i tried to union two DEs where the Month is the Primary Key. All Data Extension in the case have the fiedls type like Text. ERROR: Query failed during ...
0
votes
1answer
45 views

Problem with SQL that i want to JOIN _Sent with DE

I have a problem with my SQL where my goal is to create a Data Extension that the records will populate with the number of sent that a subscriber inside in one DE received by the month: The problem ...
0
votes
1answer
24 views

How to match journey builder email sends to Job IDs in Data View?

How can I go around matching the job ID of a Journey builder send to the list of Job IDs extracted from the data views in automation studio?
0
votes
1answer
30 views

_Open Data View General Inquiry

I am planning on using the _Open data view in my queries in automation studio, but I am not entirely sure how data gets stored there. I will phrase my question in the following scenario: I sent 2 ...
0
votes
1answer
36 views

ExactTarget : sql query from _subscribers is not retriving any record

I have below SQL query in Automation: SELECT TOP(10) EmailAddress AS EmailAddress,DateUnsubscribed AS DateUnsubscribed, Status AS Status,SubscriberKey AS SubscriberKey,SubscriberID AS SubscriberID ...
0
votes
1answer
40 views

SQL Querying subscribers older than 6 months

I am trying to query data from an existing data extension into a new data extension and filter out the subscribers that were added within the last six months. The existing data extension does not have ...
1
vote
1answer
40 views

Send a Second email to subscribers that didnt open 1st email sent via automation studio

I need to create an automation to: 1- Send and Email (from a created email template) to subscribers and informations from a Data Extension DocCobranca. 2- After 2 days has passed I need to make a ...
1
vote
2answers
71 views

SQL Query for Inactive Users- Send Log DE Code

This question is in relation to a previous question I had asked. To summarize: I am trying to run a SQL Query in automation studio to evaluate contacts in a data extension who have not opened an ...
0
votes
2answers
41 views

SQL Query: Retrieve click data from journey

I am looking for help writing an SQL query to find the data for who clicked on an email in a journey. I already know I can export the subscriber ID and a few other items from the tracking extract but ...
0
votes
1answer
41 views

Help to Change the Language for SQL Activity - Getdate

I tried to do a simple sintax, but i have a problem with the language and "getdate" I'm Brazillian and have an automation that update a Data Extension (Primary Key is month) with a FTP integration ...
0
votes
0answers
36 views

How to form a Data Extension from other Data extensions

I have 3 DataExtensions DE1 with fields(name,EmployeeId(primarykey),Group(GroupA as value)) Eg: Name -test | Name -test2 employee - 123 | employee - 124 Group - GroupA | Group- ...
2
votes
1answer
25 views

SQL for Complaint Data

I'm brand new to SQLs and need to pull a report to show the number of spam complaints our system has and which Job Ids/email sends they are associated with. Would the SQL look like this? SELECT ...
0
votes
0answers
48 views

SQL to post + 30 days by Date/Time attribute

Goal is to find rows where the date is exactly 30 days from today. Source is a Salesforce Date/Time field from a Synchronised Data Extension and posted to a regular Data Extension to Date attribute. ...
0
votes
1answer
89 views

filtering sent from unsent emails

I have a Sendable Data Extension with thousands of records. Each record represents an email request and its properties values. I was looking for a way to get a unique id for each row, if any exists. I ...
0
votes
1answer
73 views

How to split data into individual rows using SQL in Marketing Cloud

We have some data in a Marketing Cloud Data Extension that looks like this Field A Field B John Car, Boat, House, Camper Field B is all one cell We need the data to split out so ...
0
votes
1answer
100 views

How can i know total number of sends from each BU

My goal is create a Data Extension in the Parent BU with a column for my 5 BUs where the record will populate by the total number of sent last 30 days from each BU i have. I utilize only a sender ...
0
votes
1answer
56 views

Group by one column when other column differs

I am kinda stuck with a query that should increase dataquality of subscribers. I want to get all subscribers that have the same email-adress while they have different customer-numbers. Here is an ...
0
votes
1answer
68 views

SQL Join Within Same Data Extension, Surveys

I made a survey in the Sales Cloud that I am pulling into the Marketing Cloud using automation studio and the responses are saved in a data extension. However every question response appears as a ...
0
votes
1answer
17 views

Getting remaining contacts after SQL JOIN in Marketing Cloud

I have 2 data extensions, audience_1 and audience_2, which I would like to compare to see what contacts in audience_1 are unique, meaning they do not exist in both audiences. The only field that has ...
0
votes
0answers
14 views

Finding unique record in Data extension

I have the same city multiple times in my DE and want to filter and only need unique city record - I am trying below query but not working Select Store, City From ( SELECT DISTINCT City From ...