Filtering data according to a reference category – The Venn-Diagrams logic
Let’s say you have data of purchases by date (year and month) made by consumers, with the following data entries:
Table name: purchases
You might have noticed that consumers have made purchases in several months in some years.
Assuming that 2015 is a reference year in your business, you might want to filter data according to 2015. For example, you might want to explore consumers based on their purchase dates:
All of these options are very confusing when addressed only in writing, so for convince, they are also graphically presented in Venn-Diagrams:
Here is the MS SQL syntax to get the right answers for all of the options:
Hope you enjoyed this article,
Nir
Nir, thanks for sharing! I posted your post in the group. I would love to see you there: https://bit.ly/4lViIHx
Nir, thanks for sharing! My colleague would be happy to work with you. I highly recommend him. https://bit.ly/4raHtkl
פירסמתי את הפוסט שלך בקבוצה אשמח לראות אותך שם🙂 https://chat.whatsapp.com/IHTFlHbcJZJDylwqf62EwA
תודה רבה לך על השיתוף🙂 אני מזמין אותך לקבוצה שלי: הקבוצה מחברת בין ישראלים ואנשי העולם במגוון תחומים. https://chat.whatsapp.com/BubG8iFDe2bHHWkNYiboeU
תודה רבה על השיתוף! אני מזמין אותך לקבוצה שלי שמחברת בין ישראלים לשאר העולם במגוון נושאים מטרת הקבוצה לשתף מידע, לשאול שאלות וליצור שיתופי פעולה: https://chat.whatsapp.com/BubG8iFDe2bHHWkNYiboeU