add sql query to generate MeasurementOrFact