Created global sql