We changed our privacy policy. Read more.
3

Query Studio seems to run into this issue when you do not use an alias for the table. Try this: SELECT l.[Email Address] as Email FROM LIST_NAME l


1

Try running your query on one line. I've had weird behavior when I copy/paste my query in the editor.


1

SELECT DATEADD(day, DATEDIFF(day, 1, ab.CreatedDate), '09:00:00') as NextDate


1

SELECT DATEADD(Hour, 8, CAST(CAST(DATEADD(Day, 1, [CreatedDate]) AS DATE) AS DATETIME)) As NextDate This will basically force the field to 8am on the next day after CreatedDate, regardless of what time of the day is in CreatedDate. What I'm doing here is adding a day to CreatedDate, forcing it back to just a date (so the time part is removed), then forcing ...


1

I think the issue was that you were using the open domain field instead of the sent domain field. This means that (due to your conditional) only those that are in the Open DV will be counted and since you need to be sent to in order to open, then the numbers will be identical. Another thing I would look at is converting eventdate to date only (removing time) ...


1

If possible, I would suggest breaking your query out into two segments that can separate leap years from non-leap years. Then, you could add a column IsLeapYear so that you can check the type in your outer subquery and run the correct manipulation to your date. I haven't tested this logic, but here's an example: SELECT CASE WHEN x.IsLeapYear = 1 THEN ...


1

Depending on the size of your data, you may need to break this down into multiple queries, but the average time between orders for a given ClientId would be the (lastOrder-firstOrder)/(numberOfOrders-1). Running this as a single query, you could place that calculation in a subquery and then join to your Querytest table on ClientId, like this: SELECT q1....


Only top voted, non community-wiki answers of a minimum length are eligible