Questions tagged [sql-studio]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1 votes
1 answer

SQL CASE Statement is not working in SFMC Query

I am writing a query to get the specific value based on the CASE Statement. I am checking with two conditions. One for the value of the column name and other on the if another value exist in the other ...
0 votes
1 answer

SQL Query Issue to get last 12 Months data from a DE in SFMC

I am trying to get the data from a DE for last 12 months but when I am running my Query, I am only getting data November 2022 but I want to have data from each month after from November 2022 till now ...
0 votes
0 answers

SQL Query Not quite working - Unengaged Contacts

I'm using SSMS and trying to identify contacts that have received 10 or more emails in the past 1 year and have not clicked or open any. When I run the query, some contacts fit the parameters, but I ...
1 vote
2 answers

How to correctly convert Unix Timestamp to datetime in SQL

I'm trying to get the date format dd/MM/YYYY or anything readable. actually I have the date data with this format stocked in a string field "1620305130000" I have tried the following CONVERT(...
3 votes
2 answers

Query Studio Issue: Getting Email Addresses of All Auto Suppression List Subscribers

I am trying to get the email addresses of all subscribers of a specific Auto Suppression list. However, the issue is that the name of the column containing email addresses has a space i.e "Email ...
2 votes
2 answers

How to set default time in DE date field time using SQL in marketing cloud

whenever a record is created how to set the time in the Date field time value to 8AM by default. SELECT CustomerID, CreatedDate, DATEADD(Day, 1, CreatedDate) As NextDate from TestCustomers instead ...
0 votes
1 answer

SQL query to get Open rate by domain

I'm trying to build an SQL query to get the Open Rate Percentage by domain for an email send through Journey build or scheduled send. Below is the query I have trying to figure out, but it's giving me ...
0 votes
1 answer

SQL birthday reminder, leap year in Marketing cloud [closed]

i'm trying to sort out a result set that sorted by upcoming birthday. This works perfectly until leap years comes into play. For example: Nov 14 1991 - 200Days left Nov 13 1988 - 200Days left Here ...
-4 votes
1 answer

What is cast and convert in SFMC? [closed]

What is cast and convert in SFMC eg- SELECT Count(*) as Count, CAST(GETUTCDATE() as date) AS Day, GETUTCDATE() AS [Updated Date] FROM ENT.[Demo4 Contact__IQ] WHERE [Status Code] = 'Active'
0 votes
2 answers

calculate day difference between orders [closed]

I need to calculate the day difference between orders to be able to calculate the next prediction date of this order. I'm now focusing to find the day difference between orders. My assumption was to ...
0 votes
1 answer

SQL Studio query doesnt result nothing

I am quite confused because any query I run in SQL Studio results 0 records but apparently its success. See screenshot below. I just basically want to retrieve the number of email address per email ...