全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SQL及关系型数据库数据分析
7036 8
2007-12-21
http://rapidshare.com/files/78033408/Data.Analysis.Using.SQL.and.Excel.Oct.2007.rar<br/><br/>Sorry about reposting this thread, but I suppose that some guys here needing this stuff would rarely go to the page where the original thread was posted. And the downloading URL provided is located on other server, reading this thread would never affect the smoothness of this server. So I repost it here. Hope it would be helpful to those who are interested in Data Analysis.<br/><br/>Title:<br/><br/>Data Analysis Using SQL and Excel<br/><br/>Gordon S. Linoff<br/><br/>Size: 18.8MB<br/><br/>Format: PDF <br/><br/>Content:<br/><br/>Foreword xxvii<br/>Acknowledgments xxxi<br/>Introduction xxxiii<br/>Chapter 1 A Data Miner Looks at SQL 1<br/>Picturing the Structure of the Data 2<br/>What Is a Data Model? 3<br/>What Is a Table? 3<br/>Allowing NULL Values 5<br/>Column Types 6<br/>What Is an Entity-Relationship Diagram? 7<br/>The Zip Code Tables 8<br/>Subscription Dataset 10<br/>Purchases Dataset 11<br/>Picturing Data Analysis Using Dataflows 12<br/>What Is a Dataflow? 13<br/>Dataflow Nodes (Operators) 15<br/>READ: Reading a Database Table 15<br/>OUTPUT: Outputting a Table (or Chart) 15<br/>SELECT: Selecting Various Columns in the Table 15<br/>FILTER: Filtering Rows Based on a Condition 15<br/>APPEND: Appending New Calculated Columns 15<br/>UNION: Combining Multiple Datasets into One 16<br/>AGGREGATE: Aggregating Values 16<br/>LOOKUP: Looking Up Values in One Table in Another 16<br/>CROSSJOIN: General Join of Two Tables 16<br/>JOIN: Join Two Tables Together Using a Key Column 16<br/>SORT: Ordering the Results of a Dataset 17<br/>Dataflows, SQL, and Relational Algebra 17<br/>Contents<br/>ix<br/>SQL Queries 18<br/>What to Do, Not How to Do It 18<br/>A Basic SQL Query 19<br/>A Basic Summary SQL Query 20<br/>What it Means to Join Tables 22<br/>Cross-Joins: The Most General Joins 23<br/>Lookup: A Useful Join 24<br/>Equijoins 26<br/>Nonequijoins 27<br/>Outer Joins 28<br/>Other Important Capabilities in SQL 29<br/>UNION ALL 30<br/>CASE 30<br/>IN 31<br/>Subqueries Are Our Friend 32<br/>Subqueries for Naming Variables 33<br/>Subqueries for Handling Summaries 34<br/>Subqueries and IN 36<br/>Rewriting the “IN” as a JOIN 36<br/>Correlated Subqueries 37<br/>The NOT IN Operator 38<br/>Subqueries for UNION ALL 39<br/>Lessons Learned 40<br/>Chapter 2 What’s In a Table? Getting Started with Data Exploration 43<br/>What Is Data Exploration? 44<br/>Excel for Charting 45<br/>A Basic Chart: Column Charts 45<br/>Inserting the Data 46<br/>Creating the Column Chart 47<br/>Formatting the Column Chart 49<br/>Useful Variations on the Column Chart 52<br/>A New Query 52<br/>Side-by-Side Columns 52<br/>Stacked Columns 54<br/>Stacked and Normalized Columns 54<br/>Number of Orders and Revenue 54<br/>Other Types of Charts 56<br/>Line Charts 56<br/>Area Charts 57<br/>X-Y Charts (Scatter Plots) 57<br/>What Values Are in the Columns? 59<br/>Histograms 60<br/>Histograms of Counts 64<br/>Cumulative Histograms of Counts 66<br/>Histograms (Frequencies) for Numeric Values 67<br/>Ranges Based on the Number of Digits, Using<br/>Numeric Techniques 68<br/>x Contents<br/>Ranges Based on the Number of Digits, Using<br/>String Techniques 69<br/>More Refined Ranges: First Digit Plus Number of Digits 69<br/>Breaking Numerics into Equal-Sized Groups 71<br/>More Values to Explore — Min, Max, and Mode 72<br/>Minimum and Maximum Values 72<br/>The Most Common Value (Mode) 73<br/>Calculating Mode Using Standard SQL 73<br/>Calculating Mode Using SQL Extensions 74<br/>Calculating Mode Using String Operations 75<br/>Exploring String Values 76<br/>Histogram of Length 76<br/>Strings Starting or Ending with Spaces 76<br/>Handling Upper- and Lowercase 77<br/>What Characters Are in a String? 77<br/>Exploring Values in Two Columns 79<br/>What Are Average Sales By State? 79<br/>How Often Are Products Repeated within a Single Order? 80<br/>Direct Counting Approach 80<br/>Comparison of Distinct Counts to Overall Counts 81<br/>Which State Has the Most American Express Users? 83<br/>From Summarizing One Column to Summarizing<br/>All Columns 84<br/>Good Summary for One Column 84<br/>Query to Get All Columns in a Table 87<br/>Using SQL to Generate Summary Code 88<br/>Lessons Learned 90<br/>Chapter 3 How Different Is Different? 91<br/>Basic Statistical Concepts 92<br/>The Null Hypothesis 93<br/>Confidence and Probability 94<br/>Normal Distribution 95<br/>How Different Are the Averages? 99<br/>The Approach 99<br/>Standard Deviation for Subset Averages 100<br/>Three Approaches 101<br/>Estimation Based on Two Samples 102<br/>Estimation Based on Difference 104<br/>Counting Possibilities 104<br/>How Many Men? 105<br/>How Many Californians? 110<br/>Null Hypothesis and Confidence 112<br/>How Many Customers Are Still Active? 113<br/>Given the Count, What Is the Probability? 114<br/>Given the Probability, What Is the Number of Stops? 116<br/>The Rate or the Number? 117<br/>Contents xi<br/>Ratios, and Their Statistics 118<br/>Standard Error of a Proportion 118<br/>Confidence Interval on Proportions 120<br/>Difference of Proportions 121<br/>Conservative Lower Bounds 122<br/>Chi-Square 123<br/>Expected Values 123<br/>Chi-Square Calculation 124<br/>Chi-Square Distribution 125<br/>Chi-Square in SQL 127<br/>What States Have Unusual Affinities for Which<br/>Types of Products? 128<br/>Data Investigation 129<br/>SQL to Calculate Chi-Square Values 130<br/>Affinity Results 131<br/>Lessons Learned 132<br/>Chapter 4 Where Is It All Happening? Location, Location, Location 133<br/>Latitude and Longitude 134<br/>Definition of Latitude and Longitude 134<br/>Degrees, Minutes, Seconds, and All That 136<br/>Distance between Two Locations 137<br/>Euclidian Method 137<br/>Accurate Method 139<br/>Finding All Zip Codes within a Given Distance 141<br/>Finding Nearest Zip Code in Excel 143<br/>Pictures with Zip Codes 145<br/>The Scatter Plot Map 145<br/>Who Uses Solar Power for Heating? 146<br/>Where Are the Customers? 148<br/>Census Demographics 149<br/>The Extremes: Richest and Poorest 150<br/>Median Income 150<br/>Proportion of Wealthy and Poor 152<br/>Income Similarity and Dissimilarity Using Chi-Square 152<br/>Comparison of Zip Codes with and without Orders 156<br/>Zip Codes Not in Census File 156<br/>Profiles of Zip Codes with and without Orders 157<br/>Classifying and Comparing Zip Codes 159<br/>Geographic Hierarchies 162<br/>Wealthiest Zip Code in a State? 162<br/>Zip Code with the Most Orders in Each State 165<br/>Interesting Hierarchies in Geographic Data 167<br/>Counties 167<br/>Designated Marketing Areas (DMAs) 168<br/>Census Hierarchies 168<br/>Other Geographic Subdivisions 169<br/>xii Contents<br/>Calculating County Wealth 170<br/>Identifying Counties 170<br/>Measuring Wealth 171<br/>Distribution of Values of Wealth 172<br/>Which Zip Code Is Wealthiest Relative to Its County? 173<br/>County with Highest Relative Order Penetration 175<br/>Mapping in Excel 177<br/>Why Create Maps? 178<br/>It Can’t Be Done 179<br/>Mapping on the Web 180<br/>State Boundaries on Scatter Plots of Zip Codes 180<br/>Plotting State Boundaries 180<br/>Pictures of State Boundaries 182<br/>Lessons Learned 183<br/>Chapter 5 It’s a Matter of Time 185<br/>Dates and Times in Databases 186<br/>Some Fundamentals of Dates and Times in Databases 187<br/>Extracting Components of Dates and Times 187<br/>Converting to Standard Formats 189<br/>Intervals (Durations) 190<br/>Time Zones 191<br/>Calendar Table 191<br/>Starting to Investigate Dates 192<br/>Verifying that Dates Have No Times 192<br/>Comparing Counts by Date 193<br/>Orderlines Shipped and Billed 193<br/>Customers Shipped and Billed 195<br/>Number of Different Bill and Ship Dates per Order 196<br/>Counts of Orders and Order Sizes 197<br/>Items as Measured by Number of Units 198<br/>Items as Measured by Distinct Products 198<br/>Size as Measured by Dollars 201<br/>Days of the Week 203<br/>Billing Date by Day of the Week 203<br/>Changes in Day of the Week by Year 204<br/>Comparison of Days of the Week for Two Dates 205<br/>How Long between Two Dates? 206<br/>Duration in Days 206<br/>Duration in Weeks 208<br/>Duration in Months 209<br/>How Many Mondays? 210<br/>A Business Problem about Days of the Week 210<br/>Outline of a Solution 210<br/>Solving It in SQL 212<br/>Using a Calendar Table Instead 213<br/>Contents xiii<br/>Year-over-Year Comparisons 213<br/>Comparisons by Day 213<br/>Adding a Moving Average Trend Line 214<br/>Comparisons by Week 215<br/>Comparisons by Month 216<br/>Month-to-Date Comparison 218<br/>Extrapolation by Days in Month 220<br/>Estimation Based on Day of Week 221<br/>Estimation Based on Previous Year 223<br/>Counting Active Customers by Day 224<br/>How Many Customers on a Given Day? 224<br/>How Many Customers Every Day? 224<br/>How Many Customers of Different Types? 226<br/>How Many Customers by Tenure Segment? 227<br/>Simple Chart Animation in Excel 231<br/>Order Date to Ship Date 231<br/>Order Date to Ship Date by Year 234<br/>Querying the Data 234<br/>Creating the One-Year Excel Table 235<br/>Creating and Customizing the Chart 236<br/>Lessons Learned 238<br/>Chapter 6 How Long Will Customers Last? Survival Analysis<br/>to Understand Customers and Their Value 239<br/>Background on Survival Analysis 240<br/>Life Expectancy 242<br/>Medical Research 243<br/>Examples of Hazards 243<br/>The Hazard Calculation 245<br/>Data Investigation 245<br/>Stop Flag 245<br/>Tenure 247<br/>Hazard Probability 249<br/>Visualizing Customers: Time versus Tenure 250<br/>Censoring 251<br/>Survival and Retention 253<br/>Point Estimate for Survival 254<br/>Calculating Survival for All Tenures 254<br/>Calculating Survival in SQL 256<br/>Step 1. Create the Survival Table 257<br/>Step 2: Load POPT and STOPT 257<br/>Step 3: Calculate Cumulative Population 258<br/>Step 4: Calculate the Hazard 259<br/>Step 5: Calculate the Survival 259<br/>Step 6: Fix ENDTENURE and NUMDAYS in Last Row 260<br/>Generalizing the SQL 260<br/>xiv Contents<br/>A Simple Customer Retention Calculation 260<br/>Comparison between Retention and Survival 262<br/>Simple Example of Hazard and Survival 262<br/>Constant Hazard 263<br/>What Happens to a Mixture 264<br/>Constant Hazard Corresponding to Survival 266<br/>Comparing Different Groups of Customers 267<br/>Summarizing the Markets 267<br/>Stratifying by Market 268<br/>Survival Ratio 270<br/>Conditional Survival 272<br/>Comparing Survival over Time 272<br/>How Has a Particular Hazard Changed over Time? 273<br/>What Is Customer Survival by Year of Start? 275<br/>What Did Survival Look Like in the Past? 275<br/>Important Measures Derived from Survival 278<br/>Point Estimate of Survival 278<br/>Median Customer Tenure 279<br/>Average Customer Lifetime 281<br/>Confidence in the Hazards 282<br/>Using Survival for Customer Value Calculations 284<br/>Estimated Revenue 285<br/>Estimating Future Revenue for One Future Start 286<br/>SQL Day-by-Day Approach 287<br/>SQL Summary Approach 288<br/>Estimated Revenue for a Simple Group of Existing Customers 289<br/>Estimated Second Year Revenue for a Homogenous Group 289<br/>Pre-calculating Yearly Revenue by Tenure 291<br/>Estimated Future Revenue for All Customers 292<br/>Lessons Learned 295<br/>Chapter 7 Factors Affecting Survival: The What and<br/>Why of Customer Tenure 297<br/>What Factors Are Important and When 298<br/>Explanation of the Approach 298<br/>Using Averages to Compare Numeric Variables 301<br/>The Answer 301<br/>Answering the Question in SQL 302<br/>Extension to Include Confidence Bounds 304<br/>Hazard Ratios 306<br/>Interpreting Hazard Ratios 306<br/>Calculating Hazard Ratios 307<br/>Why the Hazard Ratio 308<br/>Left Truncation 309<br/>Recognizing Left Truncation 309<br/>Effect of Left Truncation 311<br/>Contents xv<br/>How to Fix Left Truncation, Conceptually 313<br/>Estimating Hazard Probability for One Tenure 314<br/>Estimating Hazard Probabilities for All Tenures 314<br/>Time Windowing 316<br/>A Business Problem 317<br/>Time Windows = Left Truncation + Right Censoring 318<br/>Calculating One Hazard Probability Using a Time Window 318<br/>All Hazard Probabilities for a Time Window 319<br/>Comparison of Hazards by Stops in Year 320<br/>Competing Risks 321<br/>Examples of Competing Risks 322<br/>I=Involuntary Churn 322<br/>V=Voluntary Churn 323<br/>M=Migration 323<br/>Other 324<br/>Competing Risk “Hazard Probability” 324<br/>Competing Risk “Survival” 326<br/>What Happens to Customers over Time 327<br/>Example 327<br/>A Cohort-Based Approach 328<br/>The Survival Analysis Approach 330<br/>Before and After 332<br/>Three Scenarios 333<br/>A Billing Mistake 333<br/>A Loyalty Program 333<br/>Raising Prices 335<br/>Using Survival Forecasts 335<br/>Forecasting Identified Customers Who Stopped 336<br/>Estimating Excess Stops 336<br/>Before and After Comparison 337<br/>Cohort-Based Approach 338<br/>Direct Estimation of Event Effect 341<br/>Approach to the Calculation 341<br/>Time-Varying Covariate Survival Using SQL and Excel 342<br/>Lessons Learned 344<br/>Chapter 8 Customer Purchases and Other Repeated Events 347<br/>Identifying Customers 348<br/>Who Is the Customer? 348<br/>How Many? 349<br/>How Many Genders in a Household 351<br/>Investigating First Names 354<br/>Other Customer Information 358<br/>First and Last Names 358<br/>Addresses 360<br/>Other Identifying Information 361<br/>xvi Contents<br/>How Many New Customers Appear Each Year? 362<br/>Counting Customers 362<br/>Span of Time Making Purchases 364<br/>Average Time between Orders 367<br/>Purchase Intervals 369<br/>RFM Analysis 370<br/>The Dimensions 370<br/>Recency 371<br/>Frequency 374<br/>Monetary 374<br/>Calculating the RFM Cell 375<br/>Utility of RFM 377<br/>A Methodology for Marketing Experiments 377<br/>Customer Migration 378<br/>RFM Limits 380<br/>Which Households Are Increasing Purchase<br/>Amounts Over Time? 381<br/>Comparison of Earliest and Latest Values 381<br/>Calculating the Earliest and Latest Values 381<br/>Comparing the First and Last Values 386<br/>Comparison of First Year Values and Last Year Values 390<br/>Trend from the Best Fit Line 392<br/>Using the Slope 393<br/>Calculating the Slope 393<br/>Time to Next Event 395<br/>Idea behind the Calculation 395<br/>Calculating Next Purchase Date Using SQL 396<br/>From Next Purchase Date to Time-to-Event 397<br/>Stratifying Time-to-Event 398<br/>Lessons Learned 399<br/>Chapter 9 What’s in a Shopping Cart? Market Basket Analysis<br/>and Association Rules 401<br/>Exploratory Market Basket Analysis 402<br/>Scatter Plot of Products 402<br/>Duplicate Products in Orders 403<br/>Histogram of Number of Units 407<br/>Products Associated with One-Time Customers 408<br/>Products Associated with the Best Customers 410<br/>Changes in Price 413<br/>Combinations (Item Sets) 415<br/>Combinations of Two Products 415<br/>Number of Two-Way Combinations 415<br/>Generating All Two-Way Combinations 417<br/>Examples of Combinations 419<br/>Variations on Combinations 420<br/>Combinations of Product Groups 420<br/>Multi-Way Combinations 422<br/>Contents xvii<br/>Households Not Orders 424<br/>Combinations within a Household 424<br/>Investigating Products within Households but<br/>Not within Orders 425<br/>Multiple Purchases of the Same Product 426<br/>The Simplest Association Rules 428<br/>Associations and Rules 428<br/>Zero-Way Association Rules 429<br/>What Is the Distribution of Probabilities? 429<br/>What Do Zero-Way Associations Tell Us? 430<br/>One-Way Association Rules 431<br/>Example of One-Way Association Rules 431<br/>Generating All One-Way Rules 433<br/>One-Way Rules with Evaluation Information 434<br/>One-Way Rules on Product Groups 436<br/>Calculating Product Group Rules Using an<br/>Intermediate Table 438<br/>Calculating Product Group Rules Using<br/>Window Functions 440<br/>Two-Way Associations 441<br/>Calculating Two-Way Associations 441<br/>Using Chi-Square to Find the Best Rules 442<br/>Applying Chi-Square to Rules 442<br/>Applying Chi-Square to Rules in SQL 444<br/>Comparing Chi-Square Rules to Lift 445<br/>Chi-Square for Negative Rules 447<br/>Heterogeneous Associations 448<br/>Rules of the Form “State Plus Product” 448<br/>Rules Mixing Different Types of Products 450<br/>Extending Association Rules 451<br/>Multi-Way Associations 451<br/>Rules Using Attributes of Products 452<br/>Rules with Different Left- and Right-Hand Sides 453<br/>Before and After: Sequential Associations 454<br/>Lessons Learned 455<br/>Chapter 10 Data Mining Models in SQL 457<br/>Introduction to Directed Data Mining 458<br/>Directed Models 459<br/>The Data in Modeling 459<br/>Model Set 459<br/>Score Set 461<br/>Prediction Model Sets versus Profiling Model Sets 461<br/>Examples of Modeling Tasks 463<br/>Similarity Models 463<br/>Yes-or-No Models (Binary Response Classification) 463<br/>xviii Contents<br/>Yes-or-No Models with Propensity Scores 464<br/>Multiple Categories 465<br/>Estimating Numeric Values 465<br/>Model Evaluation 465<br/>Look-Alike Models 466<br/>What Is the Model? 466<br/>What Is the Best Zip Code? 466<br/>A Basic Look-Alike Model 468<br/>Look-Alike Using Z-Scores 469<br/>Example of Nearest Neighbor Model 473<br/>Lookup Model for Most Popular Product 475<br/>Most Popular Product 475<br/>Calculating Most Popular Product Group 475<br/>Evaluating the Lookup Model 477<br/>Using a Profiling Lookup Model for Prediction 478<br/>Using Binary Classification Instead 480<br/>Lookup Model for Order Size 481<br/>Most Basic Example: No Dimensions 481<br/>Adding One Dimension 482<br/>Adding More Dimensions 484<br/>Examining Nonstationarity 484<br/>Evaluating the Model Using an Average Value Chart 485<br/>Lookup Model for Probability of Response 487<br/>The Overall Probability as a Model 487<br/>Exploring Different Dimensions 488<br/>How Accurate Are the Models? 490<br/>Adding More Dimensions 493<br/>Naïve Bayesian Models (Evidence Models) 495<br/>Some Ideas in Probability 495<br/>Probabilities 496<br/>Odds 497<br/>Likelihood 497<br/>Calculating the Naïve Bayesian Model 498<br/>An Intriguing Observation 499<br/>Bayesian Model of One Variable 500<br/>Bayesian Model of One Variable in SQL 500<br/>The “Naïve” Generalization 502<br/>Naïve Bayesian Model: Scoring and Lift 504<br/>Scoring with More Attributes 505<br/>Creating a Cumulative Gains Chart 506<br/>Comparison of Naïve Bayesian and Lookup Models 507<br/>Lessons Learned 508<br/>Chapter 11 The Best-Fit Line: Linear Regression Models 511<br/>The Best-Fit Line 512<br/>Tenure and Amount Paid 512<br/>Contents xix<br/>Properties of the Best-fit Line 513<br/>What Does Best-Fit Mean? 513<br/>Formula for Line 515<br/>Expected Value 515<br/>Error (Residuals) 517<br/>Preserving the Averages 518<br/>Inverse Model 518<br/>Beware of the Data 519<br/>Trend Lines in Charts 521<br/>Best-fit Line in Scatter Plots 521<br/>Logarithmic, Power, and Exponential Trend Curves 522<br/>Polynomial Trend Curves 524<br/>Moving Average 525<br/>Best-fit Using LINEST() Function 528<br/>Returning Values in Multiple Cells 528<br/>Calculating Expected Values 530<br/>LINEST() for Logarithmic, Exponential, and Power Curves 531<br/>Measuring Goodness of Fit Using R2 532<br/>The R2 Value 532<br/>Limitations of R2 534<br/>What R2 Really Means 535<br/>Direct Calculation of Best-Fit Line Coefficients 536<br/>Doing the Calculation 536<br/>Calculating the Best-Fit Line in SQL 537<br/>Price Elasticity 538<br/>Price Frequency 539<br/>Price Frequency for $20 Books 541<br/>Price Elasticity Model in SQL 542<br/>Price Elasticity Average Value Chart 543<br/>Weighted Linear Regression 544<br/>Customer Stops during the First Year 545<br/>Weighted Best Fit 546<br/>Weighted Best-Fit Line in a Chart 548<br/>Weighted Best-Fit in SQL 549<br/>Weighted Best-Fit Using Solver 550<br/>The Weighted Best-Fit Line 550<br/>Solver Is Better Than Guessing 551<br/>More Than One Input Variable 552<br/>Multiple Regression in Excel 552<br/>Getting the Data 553<br/>Investigating Each Variable Separately 554<br/>Building a Model with Three Input Variables 555<br/>Using Solver for Multiple Regression 557<br/>Choosing Input Variables One-By-One 558<br/>Multiple Regression in SQL 558<br/>Lessons Learned 560<br/>xx Contents<br/>Chapter 12 Building Customer Signatures for Further Analysis 563<br/>What Is a Customer Signature? 564<br/>What Is a Customer? 565<br/>Sources of Data for the Customer Signature 566<br/>Current Customer Snapshot 566<br/>Initial Customer Information 567<br/>Self-Reported Information 568<br/>External Data (Demographic and So On) 568<br/>About Their Neighbors 569<br/>Transaction Summaries 569<br/>Using Customer Signatures 570<br/>Predictive and Profile Modeling 570<br/>Ad Hoc Analysis 570<br/>Repository of Customer-Centric Business Metrics 570<br/>Designing Customer Signatures 571<br/>Column Roles 571<br/>Identification Columns 571<br/>Input Columns 572<br/>Target Columns 572<br/>Foreign Key Columns 572<br/>Cutoff Date 573<br/>Profiling versus Prediction 573<br/>Time Frames 573<br/>Naming of Columns 574<br/>Eliminating Seasonality 574<br/>Adding Seasonality Back In 575<br/>Multiple Time Frames 576<br/>Operations to Build a Customer Signature 577<br/>Driving Table 578<br/>Using an Existing Table as the Driving Table 578<br/>Derived Table as the Driving Table 580<br/>Looking Up Data 580<br/>Fixed Lookup Tables 581<br/>Customer Dimension Lookup Tables 582<br/>Initial Transaction 584<br/>Without Window Functions 584<br/>With Window Functions 586<br/>Pivoting 586<br/>Payment Type Pivot 588<br/>Channel Pivot 589<br/>Year Pivot 590<br/>Order Line Information Pivot 591<br/>Summarizing 594<br/>Basic Summaries 594<br/>More Complex Summaries 594<br/>Contents xxi<br/>Extracting Features 596<br/>Geographic Location Information 596<br/>Date Time Columns 597<br/>Patterns in Strings 598<br/>Email Addresses 598<br/>Addresses 599<br/>Product Descriptions 599<br/>Credit Card Numbers 600<br/>Summarizing Customer Behaviors 601<br/>Calculating Slope for Time Series 601<br/>Calculating Slope from Pivoted Time Series 601<br/>Calculating Slope for a Regular Time Series 603<br/>Calculating Slope for an Irregular Time Series 604<br/>Weekend Shoppers 604<br/>Declining Usage Behavior 606<br/>Lessons Learned 609<br/>Appendix Equivalent Constructs Among Databases 611<br/>String Functions 612<br/>Searching for Position of One String within Another 612<br/>IBM 612<br/>Microsoft 613<br/>mysql 613<br/>Oracle 613<br/>SAS proc sql 613<br/>String Concatenation 614<br/>IBM 614<br/>Microsoft 614<br/>mysql 614<br/>Oracle 614<br/>SAS proc sql 614<br/>String Length Function 614<br/>IBM 614<br/>Microsoft 615<br/>mysql 615<br/>Oracle 615<br/>SAS proc sql 615<br/>Substring Function 615<br/>IBM 615<br/>Microsoft 615<br/>mysql 615<br/>Oracle 616<br/>SAS proc sql 616<br/>Replace One Substring with Another 616<br/>IBM 616<br/>Microsoft 616<br/>xxii Contents<br/>mysql 616<br/>Oracle 616<br/>SAS proc sql 616<br/>Remove Leading and Trailing Blanks 617<br/>IBM 617<br/>Microsoft 617<br/>mysql 617<br/>Oracle 617<br/>SAS proc sql 617<br/>RIGHT Function 617<br/>IBM 617<br/>Microsoft 617<br/>mysql 618<br/>Oracle 618<br/>SAS proc sql 618<br/>LEFT Function 618<br/>IBM 618<br/>Microsoft 618<br/>mysql 618<br/>Oracle 618<br/>SAS proc sql 619<br/>ASCII Function 619<br/>IBM 619<br/>Microsoft 619<br/>mysql 619<br/>Oracle 619<br/>SAS proc sql 619<br/>Date Time Functions 619<br/>Date Constant 619<br/>IBM 620<br/>Microsoft 620<br/>mysql 620<br/>Oracle 620<br/>SAS proc sql 620<br/>Current Date and Time 620<br/>IBM 620<br/>Microsoft 620<br/>mysql 621<br/>Oracle 621<br/>SAS proc sql 621<br/>Convert to YYYYMMDD String 621<br/>IBM 621<br/>Microsoft 621<br/>mysql 621<br/>Oracle 621<br/>SAS proc sql 621<br/>Contents xxiii<br/>Year, Month, and Day of Month 622<br/>IBM 622<br/>Microsoft 622<br/>mysql 622<br/>Oracle 622<br/>SAS proc sql 623<br/>Day of Week (Integer and String) 623<br/>IBM 623<br/>Microsoft 623<br/>mysql 623<br/>Oracle 623<br/>SAS proc sql 623<br/>Adding (or Subtracting) Days from a Date 623<br/>IBM 624<br/>Microsoft 624<br/>mysql 624<br/>Oracle 624<br/>SAS proc sql 624<br/>Adding (or Subtracting) Months from a Date 624<br/>IBM 624<br/>Microsoft 624<br/>mysql 624<br/>Oracle 625<br/>SAS proc sql 625<br/>Difference between Two Dates in Days 625<br/>IBM 625<br/>Microsoft 625<br/>mysql 625<br/>Oracle 625<br/>SAS proc sql 625<br/>Difference between Two Dates in Months 625<br/>IBM 626<br/>Microsoft 626<br/>mysql 626<br/>Oracle 626<br/>SAS proc sql 626<br/>Extracting Date from Date Time 626<br/>IBM 626<br/>Microsoft 626<br/>mysql 627<br/>Oracle 627<br/>SAS proc sql 627<br/>Mathematical Functions 627<br/>Remainder/Modulo 627<br/>IBM 627<br/>Microsoft 627<br/>xxiv Contents<br/>mysql 627<br/>Oracle 627<br/>SAS proc sql 628<br/>Power 628<br/>IBM 628<br/>Microsoft 628<br/>mysql 628<br/>Oracle 628<br/>SAS proc SQL 628<br/>Floor 628<br/>IBM 628<br/>Microsoft 628<br/>mysql 629<br/>Oracle 629<br/>SAS proc sql 629<br/>“Random” Numbers 629<br/>IBM 629<br/>Microsoft 629<br/>mysql 629<br/>Oracle 629<br/>SAS proc sql 630<br/>Left Padding an Integer with Zeros 630<br/>IBM 630<br/>Microsoft 630<br/>mysql 630<br/>Oracle 630<br/>SAS proc sql 630<br/>Conversion from Number to String 630<br/>IBM 630<br/>Microsoft 631<br/>mysql 631<br/>Oracle 631<br/>SAS proc sql 631<br/>Other Functions and Features 631<br/>Least and Greatest 631<br/>IBM 631<br/>Microsoft 632<br/>mysql 632<br/>Oracle 632<br/>SAS proc sql 632<br/>Return Result with One Row 632<br/>IBM 632<br/>Microsoft 633<br/>mysql 633<br/>Oracle 633<br/>SAS proc sql 633<br/>Contents xxv<br/>Return a Handful of Rows 633<br/>IBM 633<br/>Microsoft 633<br/>mysql 633<br/>Oracle 634<br/>SAS proc sql 634<br/>Get List of Columns in a Table 634<br/>IBM 634<br/>Microsoft 634<br/>mysql 634<br/>Oracle 634<br/>SAS proc sql 635<br/>ORDER BY in Subqueries 635<br/>IBM 635<br/>Microsoft 635<br/>mysql 635<br/>Oracle 635<br/>SAS proc sql 635<br/>Window Functions 635<br/>IBM 635<br/>Microsoft 635<br/>mysql 636<br/>Oracle 636<br/>SAS proc sql 636<br/>Average of Integers 636<br/>IBM 636<br/>Microsoft 636<br/>mysql 636<br/>Oracle 636<br/>SAS proc sql 636<br/>Index 637<br/><br/>
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2008-9-25 21:22:00
<font color="#ff0000">现金<b>30??????</b></font>
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2008-9-25 22:03:00
我买了,但是下不了,请你给我发一下吧<a href="mailto:wangruishmly@163.com">wangruishmly@163.com</a>谢谢了
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2008-9-25 22:28:00
<p>太贵lke</p>
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2008-9-25 22:32:00
打不开啊,什么都没有么
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2010-6-22 04:40:48
打不开,楼主可否更新下,谢谢
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群