Skip to content

Find Recent Frequent Flyers in SQL Database

I need to find a list of frequent flyers in a database. There are 2 important tables: Demographics and Visits. This is what I have so far: It runs and returns people who visited last year 5 or more times. However, what I ACTUALLY want is people who visited 5 or more times, and have at least 1 visit last

Generate XML path format from SQL table

I was trying to get an XML from a SQL table: My Table ———— — Table1 — ———— ID Flight1 Flight2 ————————– 1 F0123 F0789 2 F0345 F0678 Query:…

FULL OUTER JOIN without any join conditions

I have two tables t1: +————–+————-+————–+ | Product Name | Issue # | Risk Level | +————–+————-+————–+ | Product1 | Incident#45 | Risk …

How to create your own week intervals

Objective: I have a 49 dates in my data set and I would like to group them by weeks in order ASC without using the WEEK or ISO_WEEK functions. The output should look like this: +————+—–…