buster/packages/database/seed-data/metricFiles.json

647 lines
21 KiB
JSON

[
{
"id": "8005c5dd-b5fe-4378-b6e4-781167a66faa",
"name": "Top Customer by Lifetime Value",
"fileName": "Top Customer by Lifetime Value",
"content": {
"sql": "SELECT \n clv.customerid, \n clv.metric_clv_all_time, \n CASE \n WHEN p.firstname IS NOT NULL THEN p.firstname || ' ' || p.lastname \n ELSE 'Customer ' || clv.customerid::text \n END AS customer_name\nFROM postgres.ont_ont.customer_all_time_clv clv\nLEFT JOIN postgres.ont_ont.customer cust ON clv.customerid = cust.customerid\nLEFT JOIN postgres.ont_ont.person p ON cust.personid = p.businessentityid\nORDER BY clv.metric_clv_all_time DESC\nLIMIT 1\n",
"name": "Top Customer by Lifetime Value",
"timeFrame": "All time",
"chartConfig": {
"colors": [
"#B399FD",
"#FC8497",
"#FBBC30",
"#279EFF",
"#E83562",
"#41F8FF",
"#F3864F",
"#C82184",
"#31FCB4",
"#E83562"
],
"barLayout": "vertical",
"barSortBy": [],
"goalLines": [],
"gridLines": true,
"pieSortBy": "value",
"showLegend": null,
"trendlines": [],
"scatterAxis": {
"x": [],
"y": [],
"size": [],
"tooltip": null,
"category": []
},
"barGroupType": "group",
"metricHeader": {
"columnId": "customer_name",
"useValue": true,
"aggregate": "first"
},
"pieChartAxis": {
"x": [],
"y": [],
"tooltip": null
},
"lineGroupType": null,
"pieDonutWidth": 40,
"xAxisDataZoom": false,
"barAndLineAxis": {
"x": [],
"y": [],
"tooltip": null,
"category": []
},
"columnSettings": {},
"comboChartAxis": {
"x": [],
"y": [],
"y2": [],
"tooltip": null,
"category": []
},
"disableTooltip": false,
"metricColumnId": "metric_clv_all_time",
"scatterDotSize": [3, 15],
"xAxisAxisTitle": null,
"yAxisAxisTitle": null,
"yAxisScaleType": "linear",
"metricSubHeader": "Top Customer by Lifetime Value",
"y2AxisAxisTitle": null,
"y2AxisScaleType": "linear",
"metricValueLabel": null,
"pieLabelPosition": "none",
"tableColumnOrder": null,
"barShowTotalAtTop": false,
"categoryAxisTitle": null,
"pieDisplayLabelAs": "number",
"pieShowInnerLabel": true,
"selectedChartType": "metric",
"tableColumnWidths": null,
"xAxisTimeInterval": null,
"columnLabelFormats": {
"customerid": {
"isUTC": false,
"style": "number",
"prefix": "",
"suffix": "",
"currency": "USD",
"columnType": "number",
"dateFormat": "auto",
"multiplier": 1,
"displayName": "",
"compactNumbers": false,
"convertNumberTo": null,
"useRelativeTime": false,
"numberSeparatorStyle": ",",
"maximumFractionDigits": 2,
"minimumFractionDigits": 0,
"makeLabelHumanReadable": true,
"replaceMissingDataWith": 0
},
"customer_name": {
"isUTC": false,
"style": "string",
"prefix": "",
"suffix": "",
"currency": "USD",
"columnType": "text",
"dateFormat": "auto",
"multiplier": 1,
"displayName": "Customer Name",
"compactNumbers": false,
"convertNumberTo": null,
"useRelativeTime": false,
"numberSeparatorStyle": null,
"maximumFractionDigits": 2,
"minimumFractionDigits": 0,
"makeLabelHumanReadable": true,
"replaceMissingDataWith": null
},
"metric_clv_all_time": {
"isUTC": false,
"style": "currency",
"prefix": "",
"suffix": "",
"currency": "USD",
"columnType": "number",
"dateFormat": "auto",
"multiplier": 1,
"displayName": "Lifetime Value",
"compactNumbers": false,
"convertNumberTo": null,
"useRelativeTime": false,
"numberSeparatorStyle": ",",
"maximumFractionDigits": 2,
"minimumFractionDigits": 0,
"makeLabelHumanReadable": true,
"replaceMissingDataWith": 0
}
},
"pieInnerLabelTitle": null,
"showLegendHeadline": false,
"xAxisLabelRotation": "auto",
"xAxisShowAxisLabel": true,
"xAxisShowAxisTitle": true,
"yAxisShowAxisLabel": true,
"yAxisShowAxisTitle": true,
"y2AxisShowAxisLabel": true,
"y2AxisShowAxisTitle": true,
"metricValueAggregate": "first",
"tableColumnFontColor": null,
"tableHeaderFontColor": null,
"yAxisStartAxisAtZero": null,
"y2AxisStartAxisAtZero": true,
"pieInnerLabelAggregate": "sum",
"pieMinimumSlicePercentage": 0,
"tableHeaderBackgroundColor": null
},
"description": "Identifies our highest value customer based on total lifetime revenue"
},
"verification": "notRequested",
"evaluationObj": null,
"evaluationSummary": null,
"evaluationScore": null,
"organizationId": "bf58d19a-8bb9-4f1d-a257-2d2105e7f1ce",
"createdBy": "c2dd64cd-f7f3-4884-bc91-d46ae431901e",
"createdAt": "2025-09-19 19:52:43.982+00",
"updatedAt": "2025-09-19 19:52:43.982+00",
"deletedAt": null,
"publiclyAccessible": false,
"publiclyEnabledBy": null,
"publicExpiryDate": null,
"versionHistory": {
"1": {
"content": {
"sql": "SELECT \n clv.customerid, \n clv.metric_clv_all_time, \n CASE \n WHEN p.firstname IS NOT NULL THEN p.firstname || ' ' || p.lastname \n ELSE 'Customer ' || clv.customerid::text \n END AS customer_name\nFROM postgres.ont_ont.customer_all_time_clv clv\nLEFT JOIN postgres.ont_ont.customer cust ON clv.customerid = cust.customerid\nLEFT JOIN postgres.ont_ont.person p ON cust.personid = p.businessentityid\nORDER BY clv.metric_clv_all_time DESC\nLIMIT 1\n",
"name": "Top Customer by Lifetime Value",
"timeFrame": "All time",
"chartConfig": {
"colors": [
"#B399FD",
"#FC8497",
"#FBBC30",
"#279EFF",
"#E83562",
"#41F8FF",
"#F3864F",
"#C82184",
"#31FCB4",
"#E83562"
],
"barLayout": "vertical",
"barSortBy": [],
"goalLines": [],
"gridLines": true,
"pieSortBy": "value",
"showLegend": null,
"trendlines": [],
"scatterAxis": {
"x": [],
"y": [],
"size": [],
"tooltip": null,
"category": []
},
"barGroupType": "group",
"metricHeader": {
"columnId": "customer_name",
"useValue": true,
"aggregate": "first"
},
"pieChartAxis": {
"x": [],
"y": [],
"tooltip": null
},
"lineGroupType": null,
"pieDonutWidth": 40,
"xAxisDataZoom": false,
"barAndLineAxis": {
"x": [],
"y": [],
"tooltip": null,
"category": []
},
"columnSettings": {},
"comboChartAxis": {
"x": [],
"y": [],
"y2": [],
"tooltip": null,
"category": []
},
"disableTooltip": false,
"metricColumnId": "metric_clv_all_time",
"scatterDotSize": [3, 15],
"xAxisAxisTitle": null,
"yAxisAxisTitle": null,
"yAxisScaleType": "linear",
"metricSubHeader": "Top Customer by Lifetime Value",
"y2AxisAxisTitle": null,
"y2AxisScaleType": "linear",
"metricValueLabel": null,
"pieLabelPosition": "none",
"tableColumnOrder": null,
"barShowTotalAtTop": false,
"categoryAxisTitle": null,
"pieDisplayLabelAs": "number",
"pieShowInnerLabel": true,
"selectedChartType": "metric",
"tableColumnWidths": null,
"xAxisTimeInterval": null,
"columnLabelFormats": {
"customerid": {
"isUTC": false,
"style": "number",
"prefix": "",
"suffix": "",
"currency": "USD",
"columnType": "number",
"dateFormat": "auto",
"multiplier": 1,
"displayName": "",
"compactNumbers": false,
"convertNumberTo": null,
"useRelativeTime": false,
"numberSeparatorStyle": ",",
"maximumFractionDigits": 2,
"minimumFractionDigits": 0,
"makeLabelHumanReadable": true,
"replaceMissingDataWith": 0
},
"customer_name": {
"isUTC": false,
"style": "string",
"prefix": "",
"suffix": "",
"currency": "USD",
"columnType": "text",
"dateFormat": "auto",
"multiplier": 1,
"displayName": "Customer Name",
"compactNumbers": false,
"convertNumberTo": null,
"useRelativeTime": false,
"numberSeparatorStyle": null,
"maximumFractionDigits": 2,
"minimumFractionDigits": 0,
"makeLabelHumanReadable": true,
"replaceMissingDataWith": null
},
"metric_clv_all_time": {
"isUTC": false,
"style": "currency",
"prefix": "",
"suffix": "",
"currency": "USD",
"columnType": "number",
"dateFormat": "auto",
"multiplier": 1,
"displayName": "Lifetime Value",
"compactNumbers": false,
"convertNumberTo": null,
"useRelativeTime": false,
"numberSeparatorStyle": ",",
"maximumFractionDigits": 2,
"minimumFractionDigits": 0,
"makeLabelHumanReadable": true,
"replaceMissingDataWith": 0
}
},
"pieInnerLabelTitle": null,
"showLegendHeadline": false,
"xAxisLabelRotation": "auto",
"xAxisShowAxisLabel": true,
"xAxisShowAxisTitle": true,
"yAxisShowAxisLabel": true,
"yAxisShowAxisTitle": true,
"y2AxisShowAxisLabel": true,
"y2AxisShowAxisTitle": true,
"metricValueAggregate": "first",
"tableColumnFontColor": null,
"tableHeaderFontColor": null,
"yAxisStartAxisAtZero": null,
"y2AxisStartAxisAtZero": true,
"pieInnerLabelAggregate": "sum",
"pieMinimumSlicePercentage": 0,
"tableHeaderBackgroundColor": null
},
"description": "Identifies our highest value customer based on total lifetime revenue"
},
"updated_at": "2025-09-19T19:52:43.982Z",
"version_number": 1
}
},
"dataMetadata": {
"row_count": 1,
"column_count": 3,
"column_metadata": [
{
"name": "customerid",
"type": "int4",
"max_value": 29818,
"min_value": 29818,
"simple_type": "number",
"unique_values": 1
},
{
"name": "metric_clv_all_time",
"type": "float8",
"max_value": 877107.192221,
"min_value": 877107.192221,
"simple_type": "number",
"unique_values": 1
},
{
"name": "customer_name",
"type": "text",
"max_value": "Roger Harui",
"min_value": "Roger Harui",
"simple_type": "text",
"unique_values": 1
}
]
},
"publicPassword": null,
"dataSourceId": "cc3ef3bc-44ec-4a43-8dc4-681cae5c996a",
"workspaceSharing": "none",
"workspaceSharingEnabledBy": null,
"workspaceSharingEnabledAt": null
},
{
"id": "c76d39e5-c1b0-4882-ba99-f3b96039c7c7",
"name": "Total Customers",
"fileName": "Total Customers",
"content": {
"sql": "SELECT COUNT(DISTINCT c.customerid) as total_customers\nFROM postgres.ont_ont.customer c\n",
"name": "Total Customers",
"timeFrame": "All time",
"chartConfig": {
"colors": [
"#B399FD",
"#FC8497",
"#FBBC30",
"#279EFF",
"#E83562",
"#41F8FF",
"#F3864F",
"#C82184",
"#31FCB4",
"#E83562"
],
"barLayout": "vertical",
"barSortBy": [],
"goalLines": [],
"gridLines": true,
"pieSortBy": "value",
"showLegend": null,
"trendlines": [],
"scatterAxis": {
"x": [],
"y": [],
"size": [],
"tooltip": null,
"category": []
},
"barGroupType": "group",
"metricHeader": null,
"pieChartAxis": {
"x": [],
"y": [],
"tooltip": null
},
"lineGroupType": null,
"pieDonutWidth": 40,
"xAxisDataZoom": false,
"barAndLineAxis": {
"x": [],
"y": [],
"tooltip": null,
"category": []
},
"columnSettings": {},
"comboChartAxis": {
"x": [],
"y": [],
"y2": [],
"tooltip": null,
"category": []
},
"disableTooltip": false,
"metricColumnId": "total_customers",
"scatterDotSize": [3, 15],
"xAxisAxisTitle": null,
"yAxisAxisTitle": null,
"yAxisScaleType": "linear",
"metricSubHeader": null,
"y2AxisAxisTitle": null,
"y2AxisScaleType": "linear",
"metricValueLabel": null,
"pieLabelPosition": "none",
"tableColumnOrder": null,
"barShowTotalAtTop": false,
"categoryAxisTitle": null,
"pieDisplayLabelAs": "number",
"pieShowInnerLabel": true,
"selectedChartType": "metric",
"tableColumnWidths": null,
"xAxisTimeInterval": null,
"columnLabelFormats": {
"total_customers": {
"isUTC": false,
"style": "number",
"prefix": "",
"suffix": "",
"currency": "USD",
"columnType": "number",
"dateFormat": "auto",
"multiplier": 1,
"displayName": "Total Customers",
"compactNumbers": false,
"convertNumberTo": null,
"useRelativeTime": false,
"numberSeparatorStyle": ",",
"maximumFractionDigits": 2,
"minimumFractionDigits": 0,
"makeLabelHumanReadable": true,
"replaceMissingDataWith": 0
}
},
"pieInnerLabelTitle": null,
"showLegendHeadline": false,
"xAxisLabelRotation": "auto",
"xAxisShowAxisLabel": true,
"xAxisShowAxisTitle": true,
"yAxisShowAxisLabel": true,
"yAxisShowAxisTitle": true,
"y2AxisShowAxisLabel": true,
"y2AxisShowAxisTitle": true,
"metricValueAggregate": "first",
"tableColumnFontColor": null,
"tableHeaderFontColor": null,
"yAxisStartAxisAtZero": null,
"y2AxisStartAxisAtZero": true,
"pieInnerLabelAggregate": "sum",
"pieMinimumSlicePercentage": 0,
"tableHeaderBackgroundColor": null
},
"description": "What is the total number of customers in our database?"
},
"verification": "notRequested",
"evaluationObj": null,
"evaluationSummary": null,
"evaluationScore": null,
"organizationId": "bf58d19a-8bb9-4f1d-a257-2d2105e7f1ce",
"createdBy": "c2dd64cd-f7f3-4884-bc91-d46ae431901e",
"createdAt": "2025-09-19 21:07:58.851+00",
"updatedAt": "2025-09-19 21:07:58.851+00",
"deletedAt": null,
"publiclyAccessible": false,
"publiclyEnabledBy": null,
"publicExpiryDate": null,
"versionHistory": {
"1": {
"content": {
"sql": "SELECT COUNT(DISTINCT c.customerid) as total_customers\nFROM postgres.ont_ont.customer c\n",
"name": "Total Customers",
"timeFrame": "All time",
"chartConfig": {
"colors": [
"#B399FD",
"#FC8497",
"#FBBC30",
"#279EFF",
"#E83562",
"#41F8FF",
"#F3864F",
"#C82184",
"#31FCB4",
"#E83562"
],
"barLayout": "vertical",
"barSortBy": [],
"goalLines": [],
"gridLines": true,
"pieSortBy": "value",
"showLegend": null,
"trendlines": [],
"scatterAxis": {
"x": [],
"y": [],
"size": [],
"tooltip": null,
"category": []
},
"barGroupType": "group",
"metricHeader": null,
"pieChartAxis": {
"x": [],
"y": [],
"tooltip": null
},
"lineGroupType": null,
"pieDonutWidth": 40,
"xAxisDataZoom": false,
"barAndLineAxis": {
"x": [],
"y": [],
"tooltip": null,
"category": []
},
"columnSettings": {},
"comboChartAxis": {
"x": [],
"y": [],
"y2": [],
"tooltip": null,
"category": []
},
"disableTooltip": false,
"metricColumnId": "total_customers",
"scatterDotSize": [3, 15],
"xAxisAxisTitle": null,
"yAxisAxisTitle": null,
"yAxisScaleType": "linear",
"metricSubHeader": null,
"y2AxisAxisTitle": null,
"y2AxisScaleType": "linear",
"metricValueLabel": null,
"pieLabelPosition": "none",
"tableColumnOrder": null,
"barShowTotalAtTop": false,
"categoryAxisTitle": null,
"pieDisplayLabelAs": "number",
"pieShowInnerLabel": true,
"selectedChartType": "metric",
"tableColumnWidths": null,
"xAxisTimeInterval": null,
"columnLabelFormats": {
"total_customers": {
"isUTC": false,
"style": "number",
"prefix": "",
"suffix": "",
"currency": "USD",
"columnType": "number",
"dateFormat": "auto",
"multiplier": 1,
"displayName": "Total Customers",
"compactNumbers": false,
"convertNumberTo": null,
"useRelativeTime": false,
"numberSeparatorStyle": ",",
"maximumFractionDigits": 2,
"minimumFractionDigits": 0,
"makeLabelHumanReadable": true,
"replaceMissingDataWith": 0
}
},
"pieInnerLabelTitle": null,
"showLegendHeadline": false,
"xAxisLabelRotation": "auto",
"xAxisShowAxisLabel": true,
"xAxisShowAxisTitle": true,
"yAxisShowAxisLabel": true,
"yAxisShowAxisTitle": true,
"y2AxisShowAxisLabel": true,
"y2AxisShowAxisTitle": true,
"metricValueAggregate": "first",
"tableColumnFontColor": null,
"tableHeaderFontColor": null,
"yAxisStartAxisAtZero": null,
"y2AxisStartAxisAtZero": true,
"pieInnerLabelAggregate": "sum",
"pieMinimumSlicePercentage": 0,
"tableHeaderBackgroundColor": null
},
"description": "What is the total number of customers in our database?"
},
"updated_at": "2025-09-19T21:07:58.851Z",
"version_number": 1
}
},
"dataMetadata": {
"row_count": 1,
"column_count": 1,
"column_metadata": [
{
"name": "total_customers",
"type": "int4",
"max_value": 19820,
"min_value": 19820,
"simple_type": "number",
"unique_values": 1
}
]
},
"publicPassword": null,
"dataSourceId": "cc3ef3bc-44ec-4a43-8dc4-681cae5c996a",
"workspaceSharing": "none",
"workspaceSharingEnabledBy": null,
"workspaceSharingEnabledAt": null
}
]