Untitled

mail@pastecode.io avatar
unknown
plain_text
3 years ago
446 B
2
Indexable
Never
SELECT
    name,
    CASE WHEN weight IS NULL
        AND units = '%' THEN
        '72'
    WHEN weight IS NULL
        AND units = 'кг' THEN
        '1'
    WHEN weight IS NULL
        AND units = 'л' THEN
        '1'
    WHEN weight IS NULL
        AND units = 'мл' THEN
        '805'
    WHEN weight IS NULL
        AND units = 'г' THEN
        '402'
    ELSE
        weight
    END AS weight_info
FROM
    products;