Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
053d27c
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
34853c3
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
6ccdc1c
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
171e356
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
af8f585
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
16cddb7
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
a4b0b10
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
fcb0d46
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
cadc1da
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
309bad3
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
d1a1149
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
29f042e
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
51dd485
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
4fb79d5
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
3f40c96
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
8d62482
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
dac04cd
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
bb1e491
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
20f5950
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
8d70225
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
a94dab9
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
a60a1a1
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
31a654b
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
aff76e2
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
d5b96c9
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
ff9a540
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
d9618eb
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
600b0ae
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
dae2ea5
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
2f85789
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
4c4968f
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
2a2f505
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
c84481c
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
7bacaaf
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
726e576
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
d55bbd4
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
c1c1798
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
3042f5b
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
fc2079d
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
1488a96
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
a598512
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
2d18ca7
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
934d2cc
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
43019a0
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
1bf3a80
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
fa3559d
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
29262fb
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
fa33614
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
6c6e134
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
1cf81eb
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
7df585d
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
30e0692
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
634e470
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
ef7731e
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
f76322f
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
de1dc52
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
1125dc3
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
c31cb56
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
c71c16b
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
50291dd
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
bdfdadb
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
02b6647
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
3ca1d8a
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
8adcc3b
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
4789968
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
823ad31
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
7b3fbbe
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
8c801c7
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
14dd162
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
42aa195
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
e381d5f
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
527d346
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
7dc6ea7
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
ea49533
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
7d5004f
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
e4ab363
Generated by SqlDBM: BigQuery Demo - v4 by "[email protected]"
eruizsqldbm Jan 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions SqlDBM/src/Tables/CRM.Account.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-- ************************** SqlDBM: BigQuery **************************
-- *** Generated by SqlDBM: BigQuery Demo by [email protected] ***

-- ************************************** CRM.Account
CREATE TABLE CRM.Account
(
AccountId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each account in the CRM system.'),
Name string(80) NOT NULL OPTIONS(description = 'The name of the account, such as a business or individual customer.'),
AccountNumber string(40) OPTIONS(description = 'A unique number associated with the account for tracking purposes.'),
Industry string(40) OPTIONS(description = 'The industry to which the account belongs (e.g., Technology, Finance).'),
AnnualRevenue numeric(18, 2) OPTIONS(description = 'The annual revenue of the account, used for analysis and segmentation.'),
Rating string(10) OPTIONS(description = 'A qualitative rating of the account (e.g., Hot, Warm, Cold) to prioritize engagement.'),
Type string(40) OPTIONS(description = 'Specifies the type of account (e.g., Customer, Partner, Prospect).'),
BillingCity string(40) OPTIONS(description = 'The city in the accounts billing address.'),
BillingCountry string(40) OPTIONS(description = 'The country in the accounts billing address.'),
CreatedDate date OPTIONS(description = 'The date when the account record was created in the CRM.')
)
OPTIONS(description = 'Stores core information about companies or individuals with whom the organization has business relationships, including customers, partners, and prospects.',
friendly_name = 'Account');
17 changes: 17 additions & 0 deletions SqlDBM/src/Tables/CRM.Campaign.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-- ************************** SqlDBM: BigQuery **************************
-- *** Generated by SqlDBM: BigQuery Demo by [email protected] ***

-- ************************************** CRM.Campaign
CREATE TABLE CRM.Campaign
(
CampaignId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each campaign, serving as the primary key.'),
Name string(120) NOT NULL OPTIONS(description = 'The name of the campaign (e.g., Spring Sale or Customer Retention Drive).'),
Type string(40) OPTIONS(description = 'Specifies the type of campaign (e.g., Email, Social Media, Direct Mail).'),
Status string(20) OPTIONS(description = 'The current status of the campaign (e.g., Active, Completed, Planned).'),
StartDate date OPTIONS(description = 'The start date of the campaign.'),
EndDate date OPTIONS(description = 'The end date of the campaign.'),
BudgetedCost numeric(18, 2) OPTIONS(description = 'The estimated financial budget allocated for the campaign.'),
CreatedDate date OPTIONS(description = 'The date when the campaign record was created.')
)
OPTIONS(description = 'Tracks marketing campaigns, including details about their type, duration, budget, and status.',
friendly_name = 'Campaign');
16 changes: 16 additions & 0 deletions SqlDBM/src/Tables/CRM.CampaignMember.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-- ************************** SqlDBM: BigQuery **************************
-- *** Generated by SqlDBM: BigQuery Demo by [email protected] ***

-- ************************************** CRM.CampaignMember
CREATE TABLE CRM.CampaignMember
(
MemberId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each campaign member, serving as the primary key.'),
CampaignId string OPTIONS(description = 'References the campaign associated with the member.'),
LeadId string OPTIONS(description = 'References the lead associated with the campaign member.'),
Status string(20) OPTIONS(description = 'Tracks the members status within the campaign (e.g., Responded, Sent).'),
CreatedDate date OPTIONS(description = 'The date when the campaign member record was created.'),
CONSTRAINT CampaignId FOREIGN KEY (CampaignId) REFERENCES CRM.Campaign (CampaignId) NOT ENFORCED,
CONSTRAINT LeadId FOREIGN KEY (LeadId) REFERENCES CRM.Lead (LeadId) NOT ENFORCED
)
OPTIONS(description = 'Tracks the participation and engagement of leads or contacts in marketing campaigns.',
friendly_name = 'CampaignMember');
19 changes: 19 additions & 0 deletions SqlDBM/src/Tables/CRM.Contact.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-- ************************** SqlDBM: BigQuery **************************
-- *** Generated by SqlDBM: BigQuery Demo by [email protected] ***

-- ************************************** CRM.Contact
CREATE TABLE CRM.Contact
(
ContactId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each contact, serving as the primary key.'),
FirstName string(40) OPTIONS(description = 'The first name of the contact.'),
LastName string(80) NOT NULL OPTIONS(description = 'The last name of the contact, which is required for proper identification.'),
AccountId string REFERENCES CRM.Account(AccountId) NOT ENFORCED OPTIONS(description = 'References the account associated with this contact.'),
Email string(80) OPTIONS(description = 'The email address of the contact, used for communication.'),
Phone string(40) OPTIONS(description = 'The primary phone number for the contact.'),
MobilePhone string(40) OPTIONS(description = 'The mobile phone number of the contact.'),
MailingCity string(40) OPTIONS(description = 'The city in the contact?s mailing address.'),
MailingCountry string(40) OPTIONS(description = 'The country in the contact?s mailing address.'),
CreatedDate date OPTIONS(description = 'The date when the contact record was created.')
)
OPTIONS(description = 'Represents individuals associated with accounts, tracking their details and enabling personalized interactions.',
friendly_name = 'Contact');
15 changes: 15 additions & 0 deletions SqlDBM/src/Tables/CRM.Contract.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-- ************************** SqlDBM: BigQuery **************************
-- *** Generated by SqlDBM: BigQuery Demo by [email protected] ***

-- ************************************** CRM.Contract
CREATE TABLE CRM.Contract
(
ContractId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each contract, serving as the primary key.'),
AccountId string REFERENCES CRM.Account(AccountId) NOT ENFORCED OPTIONS(description = 'References the account associated with this contract.'),
StartDate date OPTIONS(description = 'Specifies the start date of the contract.'),
EndDate date OPTIONS(description = 'Specifies the end date or expiration of the contract.'),
Status string(20) OPTIONS(description = 'Tracks the current status of the contract (e.g., Active, Expired).'),
CreatedDate date OPTIONS(description = 'The date when the contract record was created in the CRM.')
)
OPTIONS(description = 'Manages customer agreements, tracking contract duration, status, and associated accounts.',
friendly_name = 'Contract');
10 changes: 10 additions & 0 deletions SqlDBM/src/Tables/CRM.Event.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-- ************************** SqlDBM: BigQuery **************************
-- *** Generated by SqlDBM: BigQuery Demo by [email protected] ***

-- ************************************** CRM.Event
CREATE TABLE CRM.Event
(
EventId string NOT NULL OPTIONS(description = 'Unique identifier for each event, serving as the primary key.'),
Subject string(255)
)
OPTIONS(friendly_name = 'Event');
18 changes: 18 additions & 0 deletions SqlDBM/src/Tables/CRM.Lead.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
-- ************************** SqlDBM: BigQuery **************************
-- *** Generated by SqlDBM: BigQuery Demo by [email protected] ***

-- ************************************** CRM.Lead
CREATE TABLE CRM.Lead
(
LeadId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each lead, serving as the primary key.'),
FirstName string(40) OPTIONS(description = 'The first name of the lead, representing an individual prospect.'),
LastName string(80) NOT NULL OPTIONS(description = 'The last name of the lead, which is required for identifying the prospect.'),
Company string(80) NOT NULL OPTIONS(description = 'The name of the company associated with the lead, particularly relevant for B2B scenarios.'),
Email string(80) OPTIONS(description = 'The email address of the lead for communication purposes.'),
Phone string(40) OPTIONS(description = 'The primary phone number of the lead for contact.'),
Status string(20) OPTIONS(description = 'The current status of the lead (e.g., New, Contacted, Qualified).'),
LeadSource string(40) OPTIONS(description = 'Specifies how the lead was generated (e.g., Website, Referral, Campaign).'),
CreatedDate date OPTIONS(description = 'The date when the lead record was created.')
)
OPTIONS(description = 'Tracks potential customers and their details, enabling the sales team to qualify and convert them into opportunities.',
friendly_name = 'Lead');
17 changes: 17 additions & 0 deletions SqlDBM/src/Tables/CRM.Opportunity.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-- ************************** SqlDBM: BigQuery **************************
-- *** Generated by SqlDBM: BigQuery Demo by [email protected] ***

-- ************************************** CRM.Opportunity
CREATE TABLE CRM.Opportunity
(
OpportunityId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each opportunity, serving as the primary key.'),
Name string(120) NOT NULL OPTIONS(description = 'The name of the opportunity, such as Q1 Enterprise Sale.'),
AccountId string REFERENCES CRM.Account(AccountId) NOT ENFORCED OPTIONS(description = 'References the account associated with the opportunity, linking the deal to a customer.'),
CloseDate date OPTIONS(description = 'The expected or actual date when the opportunity is closed.'),
Stage string(40) OPTIONS(description = 'Indicates the current stage in the sales pipeline (e.g., Prospecting, Negotiation, Closed Won).'),
Amount numeric(18, 2) OPTIONS(description = 'Specifies the potential revenue value of the opportunity.'),
Probability numeric(5, 2) OPTIONS(description = 'Represents the likelihood of successfully closing the opportunity, expressed as a percentage.'),
CreatedDate date OPTIONS(description = 'The date when the opportunity record was created.')
)
OPTIONS(description = 'Tracks potential revenue-generating deals, providing visibility into the sales pipeline and supporting revenue forecasting.',
friendly_name = 'Opportunity');
17 changes: 17 additions & 0 deletions SqlDBM/src/Tables/CRM.OpportunityLineItem.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-- ************************** SqlDBM: BigQuery **************************
-- *** Generated by SqlDBM: BigQuery Demo by [email protected] ***

-- ************************************** CRM.OpportunityLineItem
CREATE TABLE CRM.OpportunityLineItem
(
LineItemId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each line item in an opportunity, serving as the primary key.'),
OpportunityId string OPTIONS(description = 'References the opportunity associated with the line item.'),
ProductId string OPTIONS(description = 'References the product associated with the line item.'),
Quantity numeric(10, 2) OPTIONS(description = 'Specifies the quantity of the product included in the line item.'),
UnitPrice numeric(18, 2) OPTIONS(description = 'Specifies the price per unit of the product.'),
CreatedDate date OPTIONS(description = 'The date when the line item record was created.'),
CONSTRAINT OpportunityId FOREIGN KEY (OpportunityId) REFERENCES CRM.Opportunity (OpportunityId) NOT ENFORCED,
CONSTRAINT ProductId FOREIGN KEY (ProductId) REFERENCES CRM.Product (ProductId) NOT ENFORCED
)
OPTIONS(description = 'Stores product-level details for opportunities, including quantity, pricing, and related products.',
friendly_name = 'OpportunityLineItem');
13 changes: 13 additions & 0 deletions SqlDBM/src/Tables/CRM.Pricebook.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- ************************** SqlDBM: BigQuery **************************
-- *** Generated by SqlDBM: BigQuery Demo by [email protected] ***

-- ************************************** CRM.Pricebook
CREATE TABLE CRM.Pricebook
(
PricebookId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each pricebook, serving as the primary key.'),
Name string(80) NOT NULL OPTIONS(description = 'The name of the pricebook (e.g., Standard Pricebook, Promotional Pricebook).'),
IsActive bool OPTIONS(description = 'Indicates whether the pricebook is active and available for use in CRM processes.'),
CreatedDate date OPTIONS(description = 'The date when the pricebook record was created.')
)
OPTIONS(description = 'Stores pricing catalogs, allowing organizations to maintain different product pricing structures for various customer segments or sales contexts.',
friendly_name = 'Pricebook');
17 changes: 17 additions & 0 deletions SqlDBM/src/Tables/CRM.PricebookEntry.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-- ************************** SqlDBM: BigQuery **************************
-- *** Generated by SqlDBM: BigQuery Demo by [email protected] ***

-- ************************************** CRM.PricebookEntry
CREATE TABLE CRM.PricebookEntry
(
EntryId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each pricebook entry, serving as the primary key.'),
PricebookId string OPTIONS(description = 'References the pricebook in which this product-price association is defined.'),
ProductId string OPTIONS(description = 'References the product associated with this pricebook entry.'),
UnitPrice numeric(18, 2) OPTIONS(description = 'Specifies the price of one unit of the product in the context of this pricebook.'),
IsActive bool OPTIONS(description = 'Indicates whether the pricebook entry is active and available for use in transactions.'),
CreatedDate date OPTIONS(description = 'The date when the pricebook entry was created in the CRM.'),
CONSTRAINT PricebookId FOREIGN KEY (PricebookId) REFERENCES CRM.Pricebook (PricebookId) NOT ENFORCED,
CONSTRAINT ProductId FOREIGN KEY (ProductId) REFERENCES CRM.Product (ProductId) NOT ENFORCED
)
OPTIONS(description = 'Connects products to specific pricebooks, defining pricing for various sales and marketing contexts.',
friendly_name = 'PricebookEntry');
15 changes: 15 additions & 0 deletions SqlDBM/src/Tables/CRM.Product.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-- ************************** SqlDBM: BigQuery **************************
-- *** Generated by SqlDBM: BigQuery Demo by [email protected] ***

-- ************************************** CRM.Product
CREATE TABLE CRM.Product
(
ProductId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each product, serving as the primary key.'),
Name string(80) NOT NULL OPTIONS(description = 'The name of the product (e.g., Premium Subscription or Wireless Headphones).'),
ProductCode string(40) OPTIONS(description = 'A unique code used to identify the product in inventory or sales records.'),
Description string OPTIONS(description = 'Optional details about the product, such as features, specifications, or benefits.'),
IsActive bool OPTIONS(description = 'Indicates whether the product is currently available for sales or use in CRM processes.'),
CreatedDate date OPTIONS(description = 'The date when the product record was added to the CRM.')
)
OPTIONS(description = 'Stores information about products or services offered by the organization, forming the foundation for pricing and sales management.',
friendly_name = 'Product');
12 changes: 12 additions & 0 deletions SqlDBM/src/Tables/CRM.Profile.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-- ************************** SqlDBM: BigQuery **************************
-- *** Generated by SqlDBM: BigQuery Demo by [email protected] ***

-- ************************************** CRM.Profile
CREATE TABLE CRM.Profile
(
ProfileId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each profile, used as the primary key.'),
Name string(80) NOT NULL OPTIONS(description = 'The name of the profile (e.g., Administrator, Sales Representative).'),
Description string OPTIONS(description = 'Optional description providing additional details about the profile and its purpose.')
)
OPTIONS(description = 'Manages security and permissions, ensuring users have appropriate access to CRM data and functionalities.',
friendly_name = 'Profile');
14 changes: 14 additions & 0 deletions SqlDBM/src/Tables/CRM.Quote.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-- ************************** SqlDBM: BigQuery **************************
-- *** Generated by SqlDBM: BigQuery Demo by [email protected] ***

-- ************************************** CRM.Quote
CREATE TABLE CRM.Quote
(
QuoteId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each quote, serving as the primary key.'),
OpportunityId string REFERENCES CRM.Opportunity(OpportunityId) NOT ENFORCED OPTIONS(description = 'References the opportunity associated with the quote.'),
Status string(20) OPTIONS(description = 'Tracks the current status of the quote (e.g., Draft, Approved, Rejected).'),
TotalPrice numeric(18, 2) OPTIONS(description = 'The total monetary value of the quote.'),
CreatedDate date OPTIONS(description = 'The date when the quote record was created.')
)
OPTIONS(description = 'Manages customer-facing pricing proposals, linking them to specific opportunities.',
friendly_name = 'Quote');
12 changes: 12 additions & 0 deletions SqlDBM/src/Tables/CRM.Role.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-- ************************** SqlDBM: BigQuery **************************
-- *** Generated by SqlDBM: BigQuery Demo by [email protected] ***

-- ************************************** CRM.Role
CREATE TABLE CRM.Role
(
RoleId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each role, used as the primary key.'),
Name string(80) NOT NULL OPTIONS(description = 'Specifies the name of the role, such as Sales Manager or Support Agent.'),
CreatedDate date OPTIONS(description = 'Records when the role was created in the CRM system.')
)
OPTIONS(description = 'Defines user roles in the CRM system, enabling role-based access control and hierarchical organization.',
friendly_name = 'Role');
10 changes: 10 additions & 0 deletions SqlDBM/src/Tables/CRM.Task.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-- ************************** SqlDBM: BigQuery **************************
-- *** Generated by SqlDBM: BigQuery Demo by [email protected] ***

-- ************************************** CRM.Task
CREATE TABLE CRM.Task
(
TaskId string NOT NULL OPTIONS(description = 'Unique identifier for each task. Used as the primary key.'),
Subject string(255)
)
OPTIONS(friendly_name = 'Task');
13 changes: 13 additions & 0 deletions SqlDBM/src/Tables/CRM.Territory.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- ************************** SqlDBM: BigQuery **************************
-- *** Generated by SqlDBM: BigQuery Demo by [email protected] ***

-- ************************************** CRM.Territory
CREATE TABLE CRM.Territory
(
TerritoryId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each territory. Serves as the primary key for territory records.'),
Name string(80) NOT NULL OPTIONS(description = 'The name of the territory (e.g., West Region, Enterprise Accounts). Used to identify and categorize territories.'),
Description string OPTIONS(description = 'Optional text providing additional details or purpose of the territory.'),
CreatedDate date OPTIONS(description = 'The date when the territory record was created in the CRM system.')
)
OPTIONS(description = 'Defines geographical or organizational regions for managing sales or service operations, aiding in resource allocation and performance tracking.',
friendly_name = 'Territory');
Loading