Last active
September 30, 2019 05:07
-
-
Save akshaykhale1992/22448e265e646c5143ec2725d0358549 to your computer and use it in GitHub Desktop.
Queries of Medium Article:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Query to find all the Active Users | |
* (if you are using `deactivated_on` date field with default NULL | |
*/ | |
SELECT * | |
FROM `users` | |
WHERE `deactivated_on` IS NULL | |
/* Query to find all the In-Active Users | |
* with the date when they were deactivated | |
*/ | |
SELECT * | |
FROM `users` | |
WHERE `deactivated_on` IS NOT NULL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment