Shopify Interview Question

Can you explain how you would design and optimize a SQL-based data pipeline to handle large-scale data processing and ensure data quality?