Added sql analysis script
Finalized