added the rough SQL querey