Cross-Platform SQL construction