Amdocs interview question

Code java (deep) SQL Query, joins Unix commands