CoolFace
Apppublic

prazy1208/text2sql

sourceHugging Faceupdated 4mo agoView on Hugging Face
0likes
insert_business_rules.sql270 linesDownload Raw Back to scripts
1-- Insert business rules for all schemas2 3-- ============================================4-- HEALTHCARE BUSINESS RULES5-- ============================================6INSERT INTO healthcare_schema.healthcare_business_rules7(concept_name, description, insight, keywords)8VALUES9('Patient Registration Activity',10'Patient registration activity reflects how new patients begin interacting with healthcare services.',11'Monitoring registration patterns helps healthcare providers understand patient intake trends and service demand.',12ARRAY['new patients','patient registration','patient intake','patient enrollment']),13 14('Patient Demographic Distribution',15'Patient demographic distribution describes how patients are represented across different demographic characteristics.',16'Understanding demographic distribution helps healthcare organizations identify the populations they serve.',17ARRAY['patient demographics','patient distribution','demographic analysis']),18 19('Patient Visit Activity',20'Patient visit activity represents how frequently patients interact with healthcare providers through appointments or consultations.',21'Tracking visit activity helps healthcare providers understand service utilization patterns.',22ARRAY['patient visits','appointments','consultations','visit frequency']),23 24('Healthcare Service Utilization',25'Healthcare service utilization reflects how healthcare services are used by patients across the organization.',26'Analyzing service utilization helps identify which services are most frequently accessed.',27ARRAY['service usage','healthcare utilization','medical services']),28 29('Treatment Patterns',30'Treatment patterns describe how different treatments or medical procedures are provided to patients.',31'Understanding treatment patterns helps healthcare organizations evaluate care delivery practices.',32ARRAY['treatment patterns','medical procedures','patient treatment']),33 34('Patient Care Activity',35'Patient care activity reflects the range of interactions between healthcare providers and patients during care delivery.',36'Monitoring care activity helps organizations understand healthcare workload and service delivery levels.',37ARRAY['patient care','care activity','medical care interactions']),38 39('Patient Health Trends',40'Patient health trends describe how patient-related health activities evolve over time.',41'Tracking trends helps healthcare providers understand changes in care demand and treatment needs.',42ARRAY['health trends','patient health patterns','health activity trends']),43 44('Healthcare Provider Activity',45'Healthcare provider activity reflects the level of engagement healthcare professionals have in delivering patient care.',46'Analyzing provider activity helps healthcare organizations understand workload distribution and service capacity.',47ARRAY['provider activity','medical staff activity','clinical workload']),48 49('Appointment Patterns',50'Appointment patterns describe how patients schedule and attend healthcare visits over time.',51'Understanding appointment patterns helps healthcare providers optimize scheduling and service availability.',52ARRAY['appointments','visit scheduling','appointment trends']),53 54('Patient Engagement',55'Patient engagement reflects how actively patients participate in healthcare services and interactions.',56'High levels of engagement often indicate stronger patient involvement in care processes.',57ARRAY['patient engagement','patient interaction','healthcare participation']),58 59('Healthcare Activity Trends',60'Healthcare activity trends describe how healthcare interactions and service usage change across different time periods.',61'Trend analysis helps healthcare organizations anticipate demand and allocate resources effectively.',62ARRAY['healthcare trends','medical activity trends','service demand trends']),63 64('Patient Participation',65'Patient participation reflects how widely healthcare services are utilized across the patient population.',66'Analyzing participation helps healthcare providers understand overall service reach.',67ARRAY['patient participation','service adoption','patient involvement']),68 69('Clinical Activity Monitoring',70'Clinical activity monitoring focuses on observing patterns in healthcare delivery and patient interactions.',71'Monitoring clinical activity helps healthcare organizations maintain efficient service operations.',72ARRAY['clinical activity','medical operations','care monitoring']),73 74('Patient Service Demand',75'Patient service demand reflects the level of need for healthcare services among patients.',76'Understanding demand helps healthcare providers plan staffing, services, and resources.',77ARRAY['service demand','healthcare demand','medical demand']),78 79('Healthcare Interaction Distribution',80'Healthcare interaction distribution describes how patient interactions are spread across different services or providers.',81'Analyzing interaction distribution helps healthcare organizations understand how care is delivered.',82ARRAY['healthcare interactions','patient interactions','service distribution']);83 84-- ============================================85-- RETAIL BUSINESS RULES86-- ============================================87INSERT INTO retail_schema.retail_business_rules88(concept_name, description, insight, keywords)89VALUES90('Customer Acquisition',91'Customer acquisition refers to the process of gaining new customers who begin interacting with the business.',92'Tracking acquisition helps businesses understand growth and evaluate outreach or marketing efforts.',93ARRAY['new customers','customer growth','customer signup','customer acquisition']),94 95('Customer Base Distribution',96'Customer base distribution describes how customers are spread across different geographic locations.',97'Understanding where customers are concentrated helps businesses identify strong markets and areas for expansion.',98ARRAY['customer location','customer regions','geographic distribution','customers by region']),99 100('Customer Growth Trends',101'Customer growth trends represent how the number of customers changes over time.',102'Analyzing these trends helps businesses measure long-term growth and customer adoption.',103ARRAY['customer trends','customer increase','customer growth over time']),104 105('Customer Engagement',106'Customer engagement reflects how actively customers interact with the business through purchasing behavior.',107'Understanding engagement levels helps identify loyal customers and overall customer activity.',108ARRAY['customer engagement','customer activity','active customers']),109 110('Customer Purchase Behavior',111'Customer purchase behavior describes patterns in how customers buy products over time.',112'Studying purchasing patterns helps businesses understand customer preferences and buying habits.',113ARRAY['purchase behavior','customer buying patterns','shopping behavior']),114 115('Product Catalog Overview',116'Product catalog analysis focuses on understanding the variety and organization of products offered by a business.',117'Reviewing the product catalog helps businesses maintain balanced offerings across categories and brands.',118ARRAY['product catalog','product list','available products']),119 120('Product Category Analysis',121'Product categories group similar products together to simplify product organization and analysis.',122'Analyzing categories helps businesses understand demand patterns across different product types.',123ARRAY['product category','product categories','category analysis']),124 125('Brand Representation',126'Brand representation reflects how different brands appear within the product assortment.',127'Understanding brand presence helps businesses evaluate brand diversity and popularity.',128ARRAY['brand presence','brand distribution','brand representation']),129 130('Product Popularity',131'Product popularity reflects the level of interest customers show in particular products.',132'Popularity insights help businesses identify products that consistently attract customer attention.',133ARRAY['popular products','trending products','product interest']),134 135('Product Introduction Trends',136'Product introduction trends describe how frequently new products are added to the catalog.',137'Monitoring product introductions helps businesses understand innovation and catalog expansion.',138ARRAY['new products','product launch','recent products']),139 140('Sales Activity',141'Sales activity represents the overall purchasing interactions occurring between customers and the business.',142'Monitoring activity levels helps businesses evaluate demand and operational performance.',143ARRAY['sales activity','transactions','purchase activity']),144 145('Order Volume',146'Order volume reflects the number of purchasing transactions occurring within a given timeframe.',147'Tracking order volume helps businesses understand changes in purchasing frequency.',148ARRAY['order volume','transaction count','number of purchases']),149 150('Sales Trends',151'Sales trends describe how purchasing activity evolves across different time periods.',152'Trend analysis helps identify growth patterns and seasonal behavior.',153ARRAY['sales trends','purchase trends','transaction trends']),154 155('Customer Purchasing Distribution',156'Customer purchasing distribution describes how purchasing activity varies among different customers.',157'Understanding purchasing distribution helps identify customers with higher engagement levels.',158ARRAY['customer spending','top customers','customer purchase activity']),159 160('Product Demand Patterns',161'Product demand patterns describe how frequently different products attract customer purchases.',162'Understanding demand patterns helps businesses recognize products that drive consistent interest.',163ARRAY['product demand','high demand products','frequently purchased products']),164 165('Product Category Demand',166'Category demand analysis evaluates how customer interest varies across different product categories.',167'This analysis helps businesses determine which types of products attract the most attention.',168ARRAY['category demand','popular categories','category interest']),169 170('Brand Interest',171'Brand interest reflects the level of customer attention or engagement associated with particular brands.',172'Analyzing brand interest helps businesses understand which brands resonate most with customers.',173ARRAY['brand interest','popular brands','brand popularity']),174 175('Customer Activity Over Time',176'Customer activity over time measures how purchasing engagement changes across different time periods.',177'Observing activity patterns helps identify periods of high or low customer interaction.',178ARRAY['customer activity trends','shopping activity','purchase timing']);179 180-- ============================================181-- FINANCE BUSINESS RULES182-- ============================================183INSERT INTO finance_schema.finance_business_rules184(concept_name, description, insight, keywords)185VALUES186('Transaction Activity',187'Transaction activity represents the overall movement of financial operations occurring within a system.',188'Monitoring transaction activity helps organizations understand operational intensity and financial usage patterns.',189ARRAY['transactions','transaction activity','financial activity']),190 191('Transaction Volume Trends',192'Transaction volume trends describe how the number of financial transactions changes over time.',193'Analyzing transaction volume helps identify periods of increased financial activity or operational demand.',194ARRAY['transaction trends','transaction volume','transaction increase']),195 196('Account Activity',197'Account activity reflects how actively financial accounts are used for transactions or operations.',198'Understanding account activity helps identify frequently used accounts and engagement patterns.',199ARRAY['account activity','active accounts','account usage']),200 201('Account Distribution',202'Account distribution describes how accounts are organized or spread across different categories or groups.',203'Analyzing distribution helps organizations understand structural patterns within the financial system.',204ARRAY['account distribution','account categories','account groups']),205 206('Financial Flow Analysis',207'Financial flow analysis examines how value moves across the financial system through transactions.',208'Understanding flow patterns helps identify major channels of financial movement.',209ARRAY['financial flow','money movement','transaction flow']),210 211('Spending Patterns',212'Spending patterns describe how financial resources are utilized across various activities.',213'Analyzing spending behavior helps organizations identify common expenditure trends.',214ARRAY['spending patterns','financial spending','expense behavior']),215 216('Revenue Activity',217'Revenue activity represents financial inflows generated through operational or business activities.',218'Monitoring revenue activity helps organizations track financial performance over time.',219ARRAY['revenue activity','income generation','financial inflow']),220 221('Expense Activity',222'Expense activity reflects financial outflows resulting from operational or business expenditures.',223'Tracking expense patterns helps organizations understand cost distribution and spending behavior.',224ARRAY['expenses','cost activity','financial outflow']),225 226('Financial Balance Monitoring',227'Balance monitoring focuses on tracking the financial position of accounts or entities over time.',228'Understanding balance patterns helps identify financial stability and resource availability.',229ARRAY['balance monitoring','account balances','financial position']),230 231('Customer Financial Behavior',232'Customer financial behavior reflects how customers interact with financial services or perform financial operations.',233'Studying financial behavior helps organizations understand customer engagement with financial systems.',234ARRAY['financial behavior','customer transactions','customer financial activity']),235 236('Transaction Frequency',237'Transaction frequency measures how often financial operations occur within a defined period.',238'Monitoring frequency helps organizations detect changes in system usage patterns.',239ARRAY['transaction frequency','transaction rate','financial operations']),240 241('Financial Activity Distribution',242'Financial activity distribution describes how financial operations are spread across different entities or accounts.',243'Understanding distribution helps identify concentration of financial activity.',244ARRAY['financial distribution','activity spread','transaction concentration']),245 246('Financial Trends Over Time',247'Financial trends describe how financial activity evolves across different time periods.',248'Trend analysis helps organizations identify growth patterns and financial cycles.',249ARRAY['financial trends','transaction trends','activity trends']),250 251('High Activity Entities',252'High activity entities represent accounts or participants that show elevated levels of financial operations.',253'Identifying high activity entities helps organizations monitor major contributors to financial activity.',254ARRAY['high activity accounts','active entities','frequent transactions']),255 256('Financial Participation',257'Financial participation reflects how widely financial services or operations are used among participants.',258'Analyzing participation helps understand adoption and engagement levels.',259ARRAY['financial participation','system usage','participant activity']),260 261('Financial Growth Patterns',262'Financial growth patterns describe increases or decreases in financial activity levels over time.',263'Understanding growth patterns helps organizations assess expansion or contraction in operations.',264ARRAY['financial growth','activity growth','transaction growth']),265 266('Operational Financial Insights',267'Operational financial insights focus on understanding the behavior and structure of financial operations within a system.',268'These insights help organizations make informed decisions about financial management and operational efficiency.',269ARRAY['financial insights','operational finance','financial analytics']);270