Meridianmeridian

Currency Amount (Indian Lakh/Crore)

finance.currency.amount_indian

Indian numbering system with irregular grouping: first three digits, then groups of two (XX,XX,XXX pattern). Lakh = 1,00,000 (100k), Crore = 1,00,00,000 (10M). Serves 1.4 billion people. Rupee symbol prefix. Period decimal separator.

Domain
finance
Category
currency
Casts to
VARCHAR
Scope
Universal

Try it

CLI
$ finetype infer -i "₹12,34,567.89"
→ finance.currency.amount_indian

DuckDB

Detect
SELECT finetype('₹12,34,567.89');
-- → 'finance.currency.amount_indian'
Cast expression
CAST(REGEXP_REPLACE(REGEXP_REPLACE({col}, '[₹Rs\.\s]', '', 'g'), ',', '') AS DECIMAL(18,2))
Safe cast pipeline
-- Normalise and cast in one step
SELECT TRY_CAST(finetype_cast(my_column) AS VARCHAR) AS clean_value
FROM my_table
WHERE finetype(my_column) = 'finance.currency.amount_indian';

Struct Expansion

Expression
numeric_value: CAST(REGEXP_REPLACE(REGEXP_REPLACE({col}, '[₹Rs\.\s]', '', 'g'), ',', '') AS DECIMAL(18,2))
symbol: REGEXP_EXTRACT({col}, '^([₹]|Rs\.?\s?)')

JSON Schema

finetype schema finance.currency.amount_indian
{
  "$id": "https://meridian.online/schemas/finance.currency.amount_indian",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Indian numbering system with irregular grouping: first three digits, then groups of two (XX,XX,XXX pattern). Lakh = 1,00,000 (100k), Crore = 1,00,00,000 (10M). Serves 1.4 billion people. Rupee symbol prefix. Period decimal separator.",
  "examples": [
    "₹12,34,567.89",
    "₹1,00,000.00",
    "₹99,999.50",
    "Rs. 1,23,456.78",
    "₹1,00,00,000.00"
  ],
  "pattern": "^[₹]?(?:Rs\\.?\\s?)?[0-9]{1,2}(,[0-9]{2})*(,[0-9]{3})(\\.[0-9]{1,2})?$",
  "title": "Currency Amount (Indian Lakh/Crore)",
  "type": "string",
  "x-finetype-broad-type": "VARCHAR",
  "x-finetype-transform": "CAST(REGEXP_REPLACE(REGEXP_REPLACE({col}, '[₹Rs\\.\\s]', '', 'g'), ',', '') AS DECIMAL(18,2))"
}

Examples

₹12,34,567.89₹1,00,000.00₹99,999.50Rs. 1,23,456.78₹1,00,00,000.00

Aliases

lakh_croreinr_amount