I would like to create a matrix for all the common columns used across multiple tables in a database sorted in descending order. For example ProductSerialNo is used in three tables.
ColumnName | Tables | Count |
---|---|---|
ProductSerialNo | Product,ProductModels,Inventory | 3 |
EquipmentNo | Equipment,Warehouse | 2 |