User Tools

Site Tools


techprivate:powerschool:duplicateshortname

Find duplicate short names

duplicateshortnames.sql
SELECT * FROM (
SELECT ps_customfields.getcf('Students',id,'short_name') short_name,
COUNT(*) AS num
FROM students
WHERE enroll_status = 0
AND ps_customfields.getcf('Students',id,'short_name') IS NOT NULL
GROUP BY ps_customfields.getcf('Students',id,'short_name')
) thelist
WHERE num > 1
techprivate/powerschool/duplicateshortname.txt · Last modified: 2012/08/29 12:44 by afrink