Data Analyst-Vorstellungsgespräch Lyndhurst, NJ (Vereinigte Staaten von Amerika)
Sapphire Digital9. You have decided to delete doctors that contained the
name ‘John’ in their name. You have a function in the lib schema called item_remove where the first item in the function is the table and the second item is the provider_id. Write a shell script that will connect to the database and loop through the provider_id into the function.
1 Antwort
Um dies zu kommentieren, bitte anmelden oder Konto anlegen.
Would you like us to review something? Please describe the problem with this {0} and we will look into it.
Your feedback has been sent to the team and we'll look into it.
CREATE TEMP TABLE csvfile(provider_id);
COPY csvfile(provider_id)
FROM 'C:\file.csv'
DELIMITER ','
CSV HEADER
;
SELECT Provider.provider_id,Provider.provider_name
FROM Provider
LEFT JOIN csvfile
ON Provider.provider_id = csvfile.provider_id
AND csvfile.provider_id IS NULL
;
##assuming we're looking for one's that don't exist in the .csv