Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
2.5 kB
2
Indexable
Never
SELECT 
    'Company' AS ColumnName, 
    Company, 
    COUNT(*) AS NumDuplicates 
FROM 
    Tl2.biview.activelocations 
GROUP BY 
    Company 
HAVING 
    COUNT(*) > 1 

UNION ALL 

SELECT 
    'Zone' AS ColumnName, 
    Zone, 
    COUNT(*) AS NumDuplicates 
FROM 
    Tl2.biview.activelocations 
GROUP BY 
    Zone 
HAVING 
    COUNT(*) > 1 

UNION ALL 

SELECT 
    'Assignment zone' AS ColumnName, 
    [Assignment zone], 
    COUNT(*) AS NumDuplicates 
FROM 
    Tl2.biview.activelocations 
GROUP BY 
    [Assignment zone] 
HAVING 
    COUNT(*) > 1 

UNION ALL 

SELECT 
    'Size' AS ColumnName, 
    Size, 
    COUNT(*) AS NumDuplicates 
FROM 
    Tl2.biview.activelocations 
GROUP BY 
    Size 
HAVING 
    COUNT(*) > 1 

UNION ALL 

SELECT 
    'Max volume' AS ColumnName, 
    [Max volume], 
    COUNT(*) AS NumDuplicates 
FROM 
    Tl2.biview.activelocations 
GROUP BY 
    [Max volume] 
HAVING 
    COUNT(*) > 1 

UNION ALL 

SELECT 
    'Total locations' AS ColumnName, 
    [Total locations], 
    COUNT(*) AS NumDuplicates 
FROM 
    Tl2.biview.activelocations 
GROUP BY 
    [Total locations] 
HAVING 
    COUNT(*) > 1 

UNION ALL 

SELECT 
    'Locationswithinventory' AS ColumnName, 
    Locationswithinventory, 
    COUNT(*) AS NumDuplicates 
FROM 
    Tl2.biview.activelocations 
GROUP BY 
    Locationswithinventory 
HAVING 
    COUNT(*) > 1 

UNION ALL 

SELECT 
    'Emptylocations' AS ColumnName, 
    Emptylocations, 
    COUNT(*) AS NumDuplicates 
FROM 
    Tl2.biview.activelocations 
GROUP BY 
    Emptylocations 
HAVING 
    COUNT(*) > 1 

UNION ALL 

SELECT 
    'Locationcapacity' AS ColumnName, 
    Locationcapacity, 
    COUNT(*) AS NumDuplicates 
FROM 
    Tl2.biview.activelocations 
GROUP BY 
    Locationcapacity 
HAVING 
    COUNT(*) > 1 

UNION ALL 

SELECT 
    'Volumeoccupiedbyvolume' AS ColumnName, 
    Volumeoccupiedbyvolume, 
    COUNT(*) AS NumDuplicates 
FROM 
    Tl2.biview.activelocations 
GROUP BY 
    Volumeoccupiedbyvolume 
HAVING 
    COUNT(*) > 1 

UNION ALL 

SELECT 
    'Percentageoccupiedbyvolume' AS ColumnName, 
    Percentageoccupiedbyvolume, 
    COUNT(*) AS NumDuplicates 
FROM 
    Tl2.biview.activelocations 
GROUP BY 
    Percentageoccupiedbyvolume 
HAVING 
    COUNT(*) > 1 

UNION ALL 

SELECT 
    'Units' AS ColumnName, 
    Units, 
    COUNT(*) AS NumDuplicates 
FROM 
    Tl2.biview.activelocations 
GROUP BY 
    Units 
HAVING 
    COUNT(*) > 1 

UNION ALL 

SELECT 
    'Deternination_zone' AS ColumnName, 
    Deternination_zone, 
    COUNT(*) AS NumDuplicates