title: Standard for running SQL queries over HTTP
body: <p>My client wants to run arbitrary SQL <code>SELECT</code> queries on the backend database of our web app, for ad-hoc reporting purposes. The requests will be read-only. Suppose the choice of analysis tool is flexible, but might include Access or psql. Rather than exposing the database on the public Internet, I want to transmit SQL queries over HTTP.</p>
  
  <p>Can I implement a web service that would allow database analysis tools to communicate with the database using a user's web app credentials? E.g. instead of the database connection string starting with <code>postgres://</code>, it would start with <code>https://</code>. Ideally I'm looking for a [de facto] standard way of doing this.</p>
  
  <p>Related but different/unanswered:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/3098608/communicate-sql-server-over-http">Communicate Sql Server over http</a></li>
  <li><a href="https://stackoverflow.com/questions/989633/standards-for-queries-over-soap">Standards for queries over SOAP</a></li>
  </ul>