I am currently working on EHR data analysis. I have a measurement table which has information lab test information of the patients. However the record count is huge. These are table count in my EHR database
It is not possible to join all the tables to get a holistic picture of the patient because the query runs for a long time due to data volume.
So, I was trying to reduce the size of the
measurement table by getting the summary like as below
But this isn't possible as well because the column count exceeds the postgresql column limit of 1644 columns.
Is there anyway to extract a representative sample from a measurement table using SQL?