Querying with Cross Joins and Self Joins