customerprofitability.dsv
来自「< SQL Server2005程序设计>」· DSV 代码 · 共 341 行 · 第 1/2 页
DSV
341 行
</xs:simpleType>
</xs:element>
<xs:element name="NumberCarsOwnedGroup" msdata:ReadOnly="true" msprop:FriendlyName="NumberCarsOwnedGroup" msprop:DbColumnName="NumberCarsOwnedGroup" msprop:design-time-name="6bb304f5-de18-4247-a415-3cc6d32ed076">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="7" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="AddressLine1" msprop:FriendlyName="AddressLine1" msprop:DbColumnName="AddressLine1" msprop:design-time-name="8b271aa2-7f73-4c93-b713-d3edb27f45d7" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="120" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="AddressLine2" msprop:FriendlyName="AddressLine2" msprop:DbColumnName="AddressLine2" msprop:design-time-name="f059ecec-5b79-4f28-8103-ecda55e06934" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="120" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Phone" msprop:FriendlyName="Phone" msprop:DbColumnName="Phone" msprop:design-time-name="6e7d5419-3322-4661-aeb6-4ddd6ec287c9" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="20" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="DateFirstPurchase" msprop:FriendlyName="DateFirstPurchase" msprop:DbColumnName="DateFirstPurchase" msprop:design-time-name="89ba57c4-b7cd-4a12-aba6-a20e0e8e44c0" type="xs:dateTime" minOccurs="0" />
<xs:element name="CommuteDistance" msprop:FriendlyName="CommuteDistance" msprop:DbColumnName="CommuteDistance" msprop:design-time-name="2c10ee46-cbf6-4a30-949f-1a5c086eafd3" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="15" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Region" msprop:FriendlyName="Region" msprop:DbColumnName="Region" msprop:design-time-name="6ec1ae4b-e4e2-43b1-9cac-16ac4cebcc76" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Age" msdata:ReadOnly="true" msprop:FriendlyName="Age" msprop:DbColumnName="Age" msprop:design-time-name="4c9feee3-cd69-4e3d-983e-2d76d58b7a08" type="xs:int" minOccurs="0" />
<xs:element name="AgeGroup" msdata:ReadOnly="true" msprop:FriendlyName="AgeGroup" msprop:DbColumnName="AgeGroup" msprop:design-time-name="4c2abf2a-e945-41ee-b9dc-14de0b97efc5">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="9" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="NumOrders" msdata:ReadOnly="true" msprop:FriendlyName="NumOrders" msprop:DbColumnName="NumOrders" msprop:design-time-name="93bd48af-ffda-4a85-96c5-1504b90164cf" type="xs:int" minOccurs="0" />
<xs:element name="IsOneTimeCustomer" msdata:ReadOnly="true" msprop:FriendlyName="IsOneTimeCustomer" msprop:DbColumnName="IsOneTimeCustomer" msprop:design-time-name="60a463bf-55d0-4674-b57e-ed8ffc79b053">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="1" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Recency" msdata:ReadOnly="true" msprop:FriendlyName="Recency" msprop:DbColumnName="Recency" msprop:design-time-name="90eeddc3-0c7b-43a3-a275-292417c0fd2a" type="xs:int" minOccurs="0" />
<xs:element name="PurchasedWithin12Months" msdata:ReadOnly="true" msprop:FriendlyName="PurchasedWithin12Months" msprop:DbColumnName="PurchasedWithin12Months" msprop:design-time-name="ecf22543-0459-4e0b-be3e-a270dabf2d11">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="1" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="RecencyGroup" msdata:ReadOnly="true" msprop:FriendlyName="RecencyGroup" msprop:DbColumnName="RecencyGroup" msprop:design-time-name="9290a3f0-4fd4-46c1-846b-2a0ef4186702">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="19" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="NumberOfProducts" msdata:ReadOnly="true" msprop:FriendlyName="NumberOfProducts" msprop:DbColumnName="NumberOfProducts" msprop:design-time-name="99022cdd-c783-4064-8b0f-c53864e83d2f" type="xs:int" minOccurs="0" />
<xs:element name="NumProdGroup" msdata:ReadOnly="true" msprop:FriendlyName="NumProdGroup" msprop:DbColumnName="NumProdGroup" msprop:design-time-name="a30b9cf3-8282-4550-bede-a1a28a551d1c">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Tenure" msdata:ReadOnly="true" msprop:FriendlyName="Tenure" msprop:DbColumnName="Tenure" msprop:design-time-name="be4888c5-13f9-476a-9a51-d99787792e15" type="xs:int" minOccurs="0" />
<xs:element name="IsNewCustomer" msdata:ReadOnly="true" msprop:FriendlyName="IsNewCustomer" msprop:DbColumnName="IsNewCustomer" msprop:design-time-name="522cd247-f796-437d-ba6d-e68c4a8866bd">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="1" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Revenue" msdata:ReadOnly="true" msprop:FriendlyName="Revenue" msprop:DbColumnName="Revenue" msprop:design-time-name="82c0f944-25c5-4c45-b549-7a925f377ef3" type="xs:decimal" minOccurs="0" />
<xs:element name="Profit" msdata:ReadOnly="true" msprop:FriendlyName="Profit" msprop:DbColumnName="Profit" msprop:design-time-name="1a3221a7-4ee9-4445-8fc5-c1d8581c1f72" type="xs:decimal" minOccurs="0" />
<xs:element name="ProfitPerOrder" msdata:ReadOnly="true" msprop:FriendlyName="ProfitPerOrder" msprop:DbColumnName="ProfitPerOrder" msprop:design-time-name="481e92fe-825a-4eef-b638-a9698ae482c9" type="xs:decimal" minOccurs="0" />
<xs:element name="ProfitPerMonth" msdata:ReadOnly="true" msprop:FriendlyName="ProfitPerMonth" msprop:DbColumnName="ProfitPerMonth" msprop:design-time-name="b48c76d2-c2c9-480a-8b03-4f94a1d9a630" type="xs:decimal" minOccurs="0" />
<xs:element name="ProfitMargin" msdata:ReadOnly="true" msprop:FriendlyName="ProfitMargin" msprop:DbColumnName="ProfitMargin" msprop:design-time-name="527418bb-8128-49ff-b486-5366ede1fe55" type="xs:decimal" minOccurs="0" />
<xs:element name="RatioRevenueToTenure" msdata:ReadOnly="true" msprop:FriendlyName="RatioRevenueToTenure" msprop:DbColumnName="RatioRevenueToTenure" msprop:design-time-name="d54e3bcb-868b-4f2e-b618-ce7f69a8710f" type="xs:decimal" minOccurs="0" />
<xs:element name="RatioNumProdToTenure" msdata:ReadOnly="true" msprop:FriendlyName="RatioNumProdToTenure" msprop:DbColumnName="RatioNumProdToTenure" msprop:design-time-name="48233b9b-6ab5-4495-81dd-dc6d0b9d1336" type="xs:decimal" minOccurs="0" />
<xs:element name="RatioProfitToTenure" msdata:ReadOnly="true" msprop:FriendlyName="RatioProfitToTenure" msprop:DbColumnName="RatioProfitToTenure" msprop:design-time-name="eff79647-ad22-4a76-9c0e-48101ec5af3f" type="xs:decimal" minOccurs="0" />
<xs:element name="ProfitCategory" msdata:ReadOnly="true" msprop:FriendlyName="ProfitCategory" msprop:DbColumnName="ProfitCategory" msprop:ComputedColumnExpression="Case
 When Profit > 1077 Then 'High'
 Else 'Low'
End" msprop:design-time-name="3399ce6a-0caa-4162-a836-ba32a3711d20" msprop:Description="High profit customers in the top quartile of profit" msprop:IsLogical="True">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="4" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="dbo_vCustomerPurchases" msprop:FriendlyName="vCustomerPurchases" msprop:DbSchemaName="dbo" msprop:DbTableName="vCustomerPurchases" msprop:design-time-name="352eb0fa-57ba-4ca8-bbaa-1763948de912" msprop:TableType="View">
<xs:complexType>
<xs:sequence>
<xs:element name="SalesOrderNumber" msprop:FriendlyName="SalesOrderNumber" msprop:DbColumnName="SalesOrderNumber" msprop:design-time-name="3c0feb35-d543-4725-816d-d0f44b2bc9f1">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="20" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="SalesOrderLineNumber" msprop:FriendlyName="SalesOrderLineNumber" msprop:DbColumnName="SalesOrderLineNumber" msprop:design-time-name="edddbddd-7c9c-4277-9389-aee6c6e612ba" type="xs:unsignedByte" />
<xs:element name="CustomerKey" msprop:FriendlyName="CustomerKey" msprop:DbColumnName="CustomerKey" msprop:design-time-name="906b557a-e08c-436b-97bc-8032aab396fc" type="xs:int" />
<xs:element name="FullDateAlternateKey" msprop:FriendlyName="FullDateAlternateKey" msprop:DbColumnName="FullDateAlternateKey" msprop:design-time-name="247bf8a3-20e6-48b8-b4f5-c7e783010000" type="xs:dateTime" minOccurs="0" />
<xs:element name="ProductCategory" msprop:FriendlyName="ProductCategory" msprop:DbColumnName="ProductCategory" msprop:design-time-name="d49e25cd-838e-4167-a4ef-b9ed2f26f286">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ProductSubcategory" msprop:FriendlyName="ProductSubcategory" msprop:DbColumnName="ProductSubcategory" msprop:design-time-name="c69277f8-0d4b-446d-9211-b0c1aeba7e46">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Model" msdata:ReadOnly="true" msprop:FriendlyName="Model" msprop:DbColumnName="Model" msprop:design-time-name="1111c6ed-d496-43d5-8373-dd17beafc756">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="OrderQuantity" msprop:FriendlyName="OrderQuantity" msprop:DbColumnName="OrderQuantity" msprop:design-time-name="327adafe-b44f-46fb-b3ba-fbba681632d9" type="xs:short" minOccurs="0" />
<xs:element name="PurchaseSequence" msprop:FriendlyName="PurchaseSequence" msprop:DbColumnName="PurchaseSequence" msprop:design-time-name="cdc9e341-760f-49c7-9633-8032ecffe4e7" type="xs:long" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//dbo_vCustomerProfitability" />
<xs:field xpath="CustomerKey" />
</xs:unique>
<xs:unique name="dbo_vCustomerPurchases_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//dbo_vCustomerPurchases" />
<xs:field xpath="SalesOrderNumber" />
<xs:field xpath="SalesOrderLineNumber" />
</xs:unique>
</xs:element>
<xs:annotation>
<xs:appinfo>
<msdata:Relationship name="vCustomerPurchases-vCustomerProfitability" msdata:parent="dbo_vCustomerProfitability" msdata:child="dbo_vCustomerPurchases" msdata:parentkey="CustomerKey" msdata:childkey="CustomerKey" msprop:Description="" msprop:IsLogical="True" />
</xs:appinfo>
</xs:annotation>
</xs:schema>
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1" />
</Schema>
</DataSourceView>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?