Normalizing a table with low integrity.
SELECT count(*) AS repcount, "Location Name" FROM mytable
WHERE "Company Name" IS NULL
GROUP BY "Location Name"
ORDER BY repcount DESC
LIMIT 5;
Tags: database
Source: By Joe Mako as answer to the question
This code snippet was collected from stackoverflow, and is licensed under CC BY-SA 3.0
Related code-snippets:
- Binary data in MySQL.
- Flat file databases are generally stored in a computer hard drive. Flat file databases cannot be shared by any party with another.
- How do I upgrade my SQL Server database version?
- How do you iterate over a result set of data?
- How do you swap unique indexed column values in database?
- If a.net Embedded Database runs on a network. Embedded Database can run off a network.
- The ability to edit a database by multiple users is essential.
- What is the best way to use a database in c#?
- How is database indexing used?
- How do I index database columns?
- Can you limit the number of records returned in LinqDataSource?
- MOSS SSP Issue - Failed database logins from deleted SSP.
- How do you persist tree structure to a database table with auto incrementing IDs using an ADO.NET DataSet and DataAdapter?
- What is heritage in database?
- Is UUID used to register database rows in web applications?