IBM interview question

Sql joins and java programming