I want to create a report in moodle through SQL Report Type. The behavior of report is like Cross Tab Report. Please guide me on this.
If I understand correctly, you'll want to look at pivoting tables with SQL unfortunately, I can't really help you anymore than without the specifics of the report you are trying to generate.
Note that pivoting a table will work if you are trying to aggregate numerical data such as grades, but it doesn't allow text concatenation as far as I know.