Though I have not used the SQL features, the RhinoPack and RhinoUnPack tools are amazing!
Slingshot! is an open source plug for Grasshopper. The tool provides node interfaces for relational database management and SQL query construction. Components allow users to perform complex database queries and commands and design workflows with external data sources.
This App is a Plugin for: Grasshopper 3D