query to find the unapproved contacts -> PGSQL

query to find the unapproved contacts -> PGSQL

Below is the query to find the unapproved contacts -> PGSQL-> can be used from version 11

SELECT aaauser.User_id AS "User ID",
aaauser.first_name "First name",
aaauser.last_name "Last name",
hd.id "Portal ID",
hd.displayname "Portal Name",
sduser.status FROM PortalUsers ptu
LEFT JOIN SDUser sduser ON ptu.USERID=sduser.USERID
LEFT JOIN AaaUser aaauser ON sduser.USERID=aaauser.USER_ID
Left Join helpdeskdetails hd on ptu.helpdeskid = hd.id where sduser.status = 'UNAPPROVED'

                  New to ADSelfService Plus?

                    • Related Articles

                    • Query to find out who created Accounts (MSSQL & PGSQL)

                      Tested in build PGSQL (14300) and MSSQL (14306) Execute the below queries under Reports->New Query Report. select org_id, org_name from accountdefinition ad where ad.org_name in('Requester Name', 'Palanivel Palras','Muhammad Nadeem Khan') Note down ...
                    • Query to find deleted survey (MSSQL & PGSQL)

                      Tested in builds from PGSQL (14300) or MSSQL (14306) Go to Reports >> New Query Report >> Run the below query to get the data SELECT err.message "System log message", err.errormodule "Module", err.suberrormodule "Sub Module", err.action "Action", ...
                    • Query to find status change, its time and comments (MSSQL & PGSQL)

                      Tested in Build PGSQL (14300) or MSSQL (14306) Execute this query under Reports->New Query Report. Date filter is highlighted, you can modify it as per the need. SELECT wo.WORKORDERID "Request ID", aau.FIRST_NAME "Requester", std.STATUSNAME "Request ...
                    • Query to show ticket aging - PGSQL

                      Last tested on 14500 Database: PGSQL: select wo.workorderid as "RequestID", modedefinition.modename "Request Mode", queuedefinition.queuename "Group", cd.CategoryName as "Category", scd.name as "SubCategory", itemdefinition.name "Item", ...
                    • Query to get the user details (both technicians and requesters) account-wise with User ID (MSSQL & PGSQL)

                      Tested in builds PGSQL (14300) or MSSQL (14306) Tested in builds : 14000, 14201, 14301 1) Query to get the First Name, Last Name, Display Name, Login User ID, Login Name, Email and Phone Number of all users in the application, account-wise, with the ...