Tango Analytics interview question

Questions include discussion on Performance tuning, asked to write a stored procedure, cursor syntax.