Posts

SQL Queries Code Interviews QA 50 plus

Image
Here are SQL-focused interview questions with only the relevant SQL code: 1. Find the second highest salary from an Employee table. SELECT MAX(Salary) AS SecondHighestSalary FROM Employees WHERE Salary < (SELECT MAX(Salary) FROM Employees); Using ROW_NUMBER(): WITH RankedSalaries AS (   SELECT Salary, ROW_NUMBER() OVER (ORDER BY Salary DESC) AS Rank   FROM Employees ) SELECT Salary AS SecondHighestSalary FROM RankedSalaries WHERE Rank = 2; --- 2. Write a query to calculate a running total of sales. SELECT   OrderID,   OrderDate,   Amount,   SUM(Amount) OVER (ORDER BY OrderDate) AS RunningTotal FROM Orders; --- 3. Retrieve customers who placed no orders using a LEFT JOIN. SELECT c.CustomerID, c.CustomerName FROM Customers c LEFT JOIN Orders o ON c.CustomerID = o.CustomerID WHERE o.OrderID IS NULL; --- 4. Write a query to find the top 3 highest salaries. SELECT DISTINCT Salary FROM Employees ORDER BY Salary DESC LIMIT 3; Using DENSE_RANK(): WIT...

Gemma 2B Fine Tuned Lightweight model

 Kaggle Notebook Gemma 2B Fine Tuned Lightweight model Step 1: Configure GPU for Memory Growth python gpus = tf.config.list_physical_devices( 'GPU' ) if gpus: try : for gpu in gpus: tf.config.experimental.set_memory_growth(gpu, True ) print ( "GPU memory growth enabled." ) except RuntimeError as e: print (e) else : print ( "No GPU found. Using CPU." ) Purpose : Ensures the GPU is set to dynamically allocate memory instead of pre-allocating all available GPU memory. This approach prevents memory wastage and allows multiple processes to use the GPU without running into memory allocation errors. Technical Details : tf.config.list_physical_devices('GPU') : Lists available GPUs. tf.config.experimental.set_memory_growth(gpu, True) : Allows TensorFlow to allocate GPU memory on demand. Fallback : If no GPU is found, the code defaults to CPU computation. Step 2: Enable Mixed Precision for Memory Optimizatio...

Space Research - Chain of thoughts, Tree of thought Framework for Research Papers and Practical innovative solution

Image
  Source Code  Kaggle Notebook:  Space Research COT TOT Prompt - Gemma 2B Responses Google Colab:  space-research-cot-tot-prompt-gemma-2b-responses (1).ipynb - Colab   Leveraging Chain of Thoughts (CoT) and Tree of Thoughts (ToT) Models for Space Research and Innovation Subject Details: Introduction to CoT and ToT Methodologies : Overview of Chain of Thoughts (CoT) as a step-by-step reasoning framework. Introduction to Tree of Thoughts (ToT) for multi-branch explorations, allowing parallel evaluation of diverse hypotheses. Applications in Research Paper Development : Enhancing clarity and logical structuring in academic papers. Automating the drafting of hypotheses, problem-solving approaches, and iterative revisions. Innovation in Space Research : Hypothesis generation for challenges like propulsion systems or asteroid mining. Multi-path exploration to cover cost, feasibility, and ethical dimensions of research. Data-driven insights to predict space weather or ...

Insurance team's work during natural disaster events Role play scenario how Insurance team's work

Image
Scenario: Underwriting Natural Disaster Risk in Hurricane-Prone Regions Key Players: 1. Sophia (Underwriting Manager): Oversees policy design and premium determination. 2. Ethan (Actuarial Analyst): Specializes in catastrophe modeling and predictive analytics. 3. Amara (Risk Assessment Lead): Focuses on environmental risk and regional vulnerability analysis. 4. Liam (Claims Analyst): Provides historical claims data and disaster impact insights. 5. Maya (GenAI Specialist): Leverages AI-driven tools for data processing and scenario simulations. --- Step 1: Initial Meeting Sophia: "Team, we’re planning to underwrite policies in a hurricane-prone region. I need a detailed analysis of potential risks and pricing recommendations." Ethan: "I’ll gather data on past hurricanes and run catastrophe models to estimate potential losses." Amara: "I’ll analyze the geographical and environmental factors contributing to the region's risk." Maya: "I’ll ...

Guidewire data analytical in house products & its usecase scenario

Image
Guidewire Data Studio Guidewire Data Studio is part of the Guidewire Data Platform, which is an enterprise-grade, cloud-native big data solution designed specifically for property and casualty (P&C) insurers. Here's an overview of its details and how one can learn about it: Details: Purpose: Guidewire Data Studio is aimed at helping insurers unlock data potential by providing tools for data ingestion, curation, and analysis. It enables insurers to ingest data from both internal and external sources, unify and transform this data, and then use it for advanced analytics, reporting, and decision-making. Key Features:  Data Ingestion: Collects data in near real-time from various systems, including Guidewire and third-party applications. Curation: Uses multiple curation engines to prepare data for use, whether in real-time or batch mode. Data Lake: Stores both raw and curated data in a scalable environment. Data Catalog: Manages metadata to make data discoverable, secure...

Introduction to genai data analytics and it is usecases

Introduction to Generative AI for Data Analytics Generative AI (GenAI) is a subset of artificial intelligence that focuses on creating new content, ideas, or insights by leveraging existing data. In the context of data analytics, GenAI can augment traditional methods by generating predictions, insights, or simulated data that improve decision-making, trend analysis, and operational efficiency. Here’s an elaboration with practical examples: --- 1. Data Synthesis for Training and Testing Use Case: Creating synthetic datasets when real-world data is sparse, incomplete, or sensitive. Example: A healthcare analytics company generates synthetic patient records using GenAI to train predictive models without violating privacy laws like HIPAA. The synthesized data mimics real-world scenarios and maintains statistical fidelity to actual patient data. --- 2. Predictive Analytics Use Case: Forecasting trends or events based on historical data patterns. Example: In retail, GenAI predicts future dem...

Guidewire Claim Insights in Databricks and Tableau - How many claims are there?

Image
 In this blog post, sharing guidewire claims how many claims got created per city  and per state basics Databricks it is available here :  Claim happened from most US State Insights data analytics Template V1.0 - Databricks SQL Sample code  select AX.CITY, count( AX.CLAIM_NUMBER) as TOTAL_CLAIMS_PER_CITY from ( select distinct C.CLAIMNUMBER as CLAIM_NUMBER, ST. NAME as STATE, ADDR.CITY from guidewire_raw_db.cc_claim C left join guidewire_raw_db.cc_contact CONT on C.INSUREDDENORMID = CONT. ID left join guidewire_raw_db.cc_address ADDR on CONT.PRIMARYADDRESSID = ADDR. ID left join guidewire_raw_db.cctl_state ST on ADDR.STATE = ST. ID ) AX group by AX.CITY order by 2 desc From these SQL Query Resultsets Feed into Tableau Public Edition This Tableau Public view Available here  https://public.tableau.com/views/Guidewire_Insurance_Claims_Insights_one/InsuranceClaimsPerCity?:language=en-US&:sid=&:redirect=auth&:display_count=n&...

Guidewire Self-Managed Data Integration with Business context

Image
 In Guidewire, We have majorly four centers: 1. Contact Manager 2. Policy Center 3. Billing Center 4. Claim Center Business Context wise follow the same order to remember that business & data integration ways it is best approach, While loading sample data with individual instances load sample data in the same order 1,2,3,4; Once after loading the sample data stop the server and then after do the integration between multiple centers in both directions  1. Contact Manager to All remaining xCenters and vice versa, reverse directions also possible 2. Policy center to integrate with Billingcenter and Claimcenter as well as viceversa 3. Billingcenter & claimcenter there is not possible to integrate !! Coming to Business context how to easily recall above sequence    1. Contact Manager:   It is used to create diverse contacts broadly into Person / Company types; Contact Manager with AddressbookUID, PublicIDs are available, any business contact is im...