I was wondering if there is an efficient way to extract data on all the stocks from the CRSP dataset?
In the Query Form I only have the option to enter company codes individually or to upload a .txt file with one company code per line. Both of which is not an efficient option. Is there a way to possibly achieve this goal in R or Python?

search the entire database, you obtain data for all assets. You should thus throw out all data you don't want. In empirical asset pricing, you typically only include stocks withshrcd(share codde) 10 and 11 (common equity) andexchcd(exchange code) 1, 2 and 3 (NYSE, AMEX, NASDAQ). – Kevin Jul 22 '20 at 21:46