Pyspark Technical Interview Question 1 using split,explode

Publié le: 12 août 2023
sur la chaîne: SanjayBedwal
219
11

Question :
QUESTION
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
courses:-
COURSE_ID,COURSE,FEE
100,Physics,1500
101,Geography,1000
102,Math,2000
103,Biology,1400
104,Chemistry,1700
105,English,800
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
students:-
ID,STUDENT_NAME,AGE,COURSES
1,Alok,18,Geography|Biology
2,Prakash,16,Math|English|Geography
3,Anna,16,Biology
3,ANNA,16,Biology
1,Alok,18,Geography
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


List down all of the courses available along with their student count,
Course with max total-revenue(fees-collection) should be on the top followed by rest.
If for 2 courses , total-revenue match then order the course on STUDENT_COUNT most on top.

Expected o/p pattern-1:-

COURSE,STUDENT_COUNT,COURSE_REVENUE_TOTAL
Biology,2,2800
Geography,2,2000
Math,1,2000
English,1,800
Chemistry,0,0
Physics,0,0

~~~~~~~~~~~~~


program solution link : https://github.com/bedwalsanjay/spark...


Sur cette page du site, vous pouvez voir la vidéo en ligne Pyspark Technical Interview Question 1 using split,explode durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur SanjayBedwal 12 août 2023, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 219 fois et il a aimé 11 téléspectateurs. Bon visionnage!