How do you ensure data quality and consistency when dealing with disparate data sources like ERP systems and construction project logs at Crusoe?
Using the provided tables, write a query that reconciles ERP labor hours against construction project log hours and identifies data quality issues.
Output
- One row per project ID appearing in the project, ERP, or log data.
- Return
project_id, project_name, erp_hours, logged_hours, hours_variance, and quality_status.
- Include missing-source, null-value, and hours-discrepancy conditions. Sort by
project_id ascending.