modified the drug report to use sql queries