Skip to main content

ER Diagrams and SQLs

Consolidated table to data source to fact table mapping

Consolidated Table

Data Source in Tableau

Fact Table

sales_fact_consolidated

Sales

bi_factinvoiceitem

collections_fact_consolidated

Collections

bi_factcollections

campaigndiscount_fact_consolidated

Campaign_discount

bi_factcampaigndiscount

campaign_fact_consolidated

Campaigns

bi_factcampaignsummary

cashregiser_fact_consolidated

Cash Register

bi_factcashregister

appointment_fact_consolidated

Appointments

bi_factappointment

deleted_appointments_fact_consolidated

Deleted Appointments

bi_factdeletedappointment

package_user_fact_consolidated

Packages

bi_factpackageuserredemptions

employee_tips_ssg_consolidated

Employee Tips SSG

bi_factemployeetipsandssgdetails

empcommission_fact_consolidated

Employee Commission

bi_factemployeecommission

MultipleEmpComissions_Consolidated

MultipleEmpComissions_Consolidated

bi_factmultipleemployeecommission

emphourlypay_fact_consolidated

Employee Hourly Pay

bi_factemployeepay

empsalary_fact_consolidated

Employee Salary

bi_factemployeesalary

issues_fact_consolidated

Issues

bi_factIssues

loyaltypoints_fact_consolidated

Loyaltypoints

bi_factloyaltypoints, bi_factguesttierchanges

giftcards_fact_consolidated

GiftCards

bi_factgiftcards

opportunities_fact_consolidated

Opportunities

bi_factissues

pettycash_fact_consolidated

PettyCash

bi_factpettycashdetails

schedule_fact_consolidated

Employee Schedules

bi_factemployeeschedule

turnaway_fact_consolidated

Turnaways

bi_factturnaways

membership_fact_consolidated

Memberships

bi_dimusermembership

membership_fact_consolidated_date

Memberships Datewise

bi_dimusermembership

membership_dunning_consolidated

Membership dunning

bi_factmembershipdunning

Membership_User_Fact_Consolidated

Membership Redemptions

Bi_FactMembershipUserRedemptions

inventory_fact_consolidated

Inventory

bi_factinventory

appointmentredo_fact_consolidated

Redo Appointments

bi_factappointmentredo

appointmentsegment_fact_consolidated

Appointment_Segment

bi_factappointment

registration_fact_consolidated

Registration

bi_factregistration

forms_fact_consolidated

Forms

bi_factforms

scheduled_collections_consolidated

Scheduled collections

bi_factscheduledcollections

donations_fact_consolidated

Donations

bi_factinvoicedonations

employeeinvoiceitemrevenue_fact_consolidated

Employee Revenue

bi_factemployeeinvoiceitemrevenue

empdeclaretips_fact_consolidated

Employee Declared Tips

bi_factemployeedeclaretips

SQLs

SQL codes show how each consolidated table is generated from the fact and dimension tables.

Download the SQLs ZIP file

ER Diagrams

BI_FACTINVOICEITEM ER diagram (Fact)

Bi_FactInvoiceItem.png

BI_FACTCOLLECTIONS ER diagram (Fact)

Bi_Factcollections.png

BI_FACTCAMPAIGNDISCOUNT ER diagram (Fact)

Bi_FactCampaignDiscount.png

BI_FACTCAMPAIGNSUMMARY ER diagram (Fact)

Bi_FactCampaignSummary.png

BI_FACTCASHREGISTER ER diagram (Fact)

Bi_FactCashRegister.png

BI_FACTAPPOINTMENT ER diagram (Fact)

Bi_FactAppointment.png

BI_FACTDELETEDAPPOINTMENT ER diagram (Fact)

Bi_FactDeletedAppointment.png

BI_FACTPACKAGEUSERREDEMPTIONS ER diagram (Fact)

Bi_FactPackageUserRedemptions.png

BI_FACTEMPLOYEETIPSANDSSGDETAILS ER diagram (Fact)

Bi_FactEmployeeTipsAndSSGDetails.png

BI_FACTEMPLOYEECOMMISSION ER diagram (Fact)

Bi_FactEmployeeCommission.png

BI_FACTMULTIPLEEMPLOYEECOMMISSION ER diagram (Fact)

Bi_FactMultipleEmployeeCommission.png

ER Diagram (Fact): BI_FACTEMPLOYEEPAY

Bi_FactEmployeePay.png

BI_EMPLOYEESALARY ER diagram (Fact)

Bi_FactEmployeeSalary.png

BI_FACTISSUES ER diagram (Fact)

Bi_FactIssues.png

BI_FACTLOYALTYPOINTS and BI_FACTGUESTTIERCHANGES ER diagram (Fact)

BI_FACTLOYALTYPOINTS_FACTGUESTTIERCHANGES.jpg

BI_FACTGIFTCARDS ER diagram (Fact)

Bi_FactGiftCards.png

BI_FACTPETTYCASHDETAILS ER diagram (Fact)

Bi_FactPettyCashDetails.png

BI_FACTEMPLOYEESCHEDULE ER diagram (Fact)

Bi_FactEmployeeSchedule.png

BI_FACTTURNAWAYS ER diagram (Fact)

Bi_FactTurnAways.png

BI_DIMUSERMEMBERSHIP ER diagram (Fact)

253_1.png

For Membership Datewise

253_2.png

BI_FACTMEMBERSHIPUSERREDEMPTIONS ER diagram (Fact)

Bi_FactMembershipUserRedemptions.png

BI_FACTINVENTORY ER diagram (Fact)

Bi_FactInventory.png

BI_FACTAPPOINTMENTREDO ER diagram (Fact)

Bi_FactAppointmentRedo.png

BI_FACTREGISTRATION ER diagram (Fact)

Bi_FactRegistration.png

BI_FACTFORMS ER diagram (Fact)

Bi_FactForms.png

BI_FACTSCHEDULEDCOLLECTIONS ER diagram (Fact)

Bi_FactScheduledCollections.png

BI_FACTDONATIONS ER diagram (Fact)

donations_er.PNG

BI_FACTMEMBERSHIPDUNNING ER diagram (Fact)

Bi_FactMembershipDunning.png

BI_FACTISSUES ER diagram (Fact)

Bi_FactIssues.png

ER Diagram (Fact): BI_FACTINVOICEDONATIONS

Bi_FactInvoiceDonations.png

BI_FACTEMPLOYEEINVOICEITEMREVENUE ER diagram (Fact)

Bi_FactEmployeeInvoiceItemRevenue.png

BI_FACTEMPLOYEEDECLARETIPS ER diagram (Fact)

Bi_FactEmployeeDeclareTips.png