You'll need to configure the SonarQube server to use this db. The SonarQube schema is created the first time you run the server. This will generate the SonarQube database instance, as well as grant access from localhost and remotely.
The command to execute the query is at the top of the file.My interest in Sonar comes from the curiosity towards Code Quality and how to communicate it. I am not a member of the Sonar project nor an active contributor. SonarQube is a tool that provides valuable information on code quality and issues over time.