Skip to main content

Posts

Adding Primary key

Dropping existing Primary key   ALTER TABLE  [TABLE1] DROP CONSTRAINT [ pkPartIdPartRevTestCode ] Creating New Primary key ALTER TABLE   [TABLE1] ADD CONSTRAINT pkPartIdTestIdSupplierCode PRIMARY KEY (PartId, TestCodeId, SupplierCode);
Recent posts

To extract distinct part numbers from an Excel sheet using an SSIS package

  🛠 Steps in SSIS to Get Distinct Part Numbers from Excel Add an Excel Source : In your Data Flow Task, drag an Excel Source . Configure it to point to your Excel file. Select the sheet or named range that contains the part numbers. Add a Sort Transformation : Drag a Sort Transformation into the Data Flow. Connect the Excel Source to the Sort. In the Sort editor: Check the box for the Part Number column. Check Remove rows with duplicate sort values — this will give you distinct part numbers. Add a Destination : Drag a destination (e.g., Flat File Destination , OLE DB Destination , etc.). Connect the Sort output to the destination. Configure the destination to store the distinct part numbers. Run the Package : Execute the package to extract and store the distinct part numbers.

Data Warehouse vs Data Lake vs Data Lakehouse

  Link to the video :  https://www.youtube.com/watch?v=yRerKDM1h74

Create Summarize table

Problem In this scenario, the requirement is to create a table based on the following fields: Part Number Lemon Score Lemon Score Category Month-Year Here, both Lemon Score and Lemon Score Category are measures , not columns. Solution Since measures return scalar values and cannot be directly used for grouping or categorization in a table, we need to create a summarized table that includes the necessary dimensions and calculated measures. This can be achieved using the SUMMARIZECOLUMNS function in DAX. Here’s how you can create the summarized table: DAX SummarizeTable = SUMMARIZECOLUMNS ( 'Part Daily Details' [ Part Number ] , CalendarTable [ Month - Year ] , "Lemon Score" , [ Lemon Score ] , "Category" , [ Lemon Score Category ] ) Show more l This DAX expression creates a new table that includes: Each unique Part Number Corresponding Month-Year from the calendar table The calculated Lemon Score measure The derived Lemo...

Multi factor investment strategy

 Based on the analysis of multi-factor investment strategies over the long term, the factor combination that yielded the highest return was Momentum and Quality . This finding is based on an analysis of 20-year SIP returns (Systematic Investment Plans), assuming a 50:50 allocation split between the two factor indices. The top performing factor combinations were: Nifty 500 Momentum 50 + Quality 50: This combination delivered the highest annualised return of 18.9 per cent . Momentum + Low Volatility: This was the second-highest performer, returning 18.7 per cent annually. Value 50 + Alpha 50: This combination followed closely, returning 18.6 per cent annually. These multi-factor strategies aim to smooth out the investment journey and improve long-term performance by combining complementary factors. It is also noted that the combination of Nifty 500 Low Volatility 50 + Nifty 500 Momentum 50 and the combination of Nifty 500 Momentum 50 + Nifty 500 Quality 50 delivered ...

Emergency Fund Planning

 Excellent — let’s plan this like a top-tier financial planner would. 🧮 Step 1: Determine Ideal Emergency Fund Size Your monthly expense = ₹30,000 . Emergency fund is meant to cover living expenses when income stops (job loss, illness, etc.). Recommended range: Risk Level Duration Fund Amount Minimal dependents, stable job 3 months ₹90,000 Moderate dependents, average job stability 6 months ₹1,80,000 High dependents / uncertain income / self-employed 9–12 months ₹2,70,000 – ₹3,60,000 ✅ Ideal for most people: 6 months = ₹1.8 lakh. If you have dependents or irregular income, build toward ₹3 lakh . 🏦 Step 2: Where to Keep Your Emergency Fund The key principles: 100% Liquidity (instant access) Capital protection Reasonable return (better than savings a/c) We split it across 3 buckets for safety + liquidity: 1️⃣ Instant Access (30% = ₹54,000) Purpose: For true emergencies — medical, job loss, etc. Where: High-interest Savings A...

How to value Stocks

  Link to the video :  https://www.youtube.com/watch?v=hfsgVrKedJM