Posts

Showing posts from June, 2019

Build a store procedure to Update and insert table ?

Image
I have Two tables in my Database called  AvaiableBalance and  Balancewithdraw.  This table( AvaiableBalance   )  store the customer   Bank balance and A/C details and one more table ( Balancewithdraw ) store the data when customer withdraw amount from ATM or Bank. this is the two tables history. now when customer with draw  balance at ATM at the same time update the table called  AvaiableBalance   and insert a new Record into   Balancewithdraw table. for this problem we going to achive through Store Procedure Balance withdraw table - when we with draw amount at that time we insert data into  Balancewithdraw   table automatically with above values ( A/c No, What is the withdraw balance, Withdraw time and date ) Create store procedure- /************************************************ Sp name                ...

What is the best resource to learn SQL and MSBI Tools ?

Hello techies, SQL is one of the easiest language to learn anybody. Some of the  free resources to learn SQL as well as MSBI tools Listed bellow. SQL Videos:- 1. Kudvenkat   - this is one of the best resource to learn SQL Basic to advanced.this Chanel covered all the concepts.   2. Bhasker Jogi  - This is the second resources to learn SQL Database MSBI tools: - 3. MSBI Tools (SSIS,SSRS,SSAS) - This is one of the best Resources to start Learning for Beginners.  Once you get good command over SQL then try to sallow some coding challenges. using Hanker Rank web link. its boost your skills. 

Answers for Sql interview questions ?

Image
Problem 1 find the problem statement click on the bellow link           Problem Statement Answer select * from plch_by_car intersect select * from plch_by_car union select * from plch_on_foot Problem 2 find the problem statement click on the bellow link            Problem Statement in this problem we are using LAG function to sallow this problem. for Lag function followed by Over and order by  clause  is required  Answer select Logg_date , logged_price , round ( isnull ( logged_price - lag ( logged_price ) over ( order by Logg_date ), ' ' ), 2 ) as yesterday_diff , round ( isnull ( logged_price - lag ( logged_price , 2 ) over ( order by Logg_date ), ' ' ), 2 ) as Day_Before_yesterday_diff   from PLCH_GAS_PRICE order by Logg_date if we are not using  round  function then data comes like this  Problem 3 find the problem stat...

SQL Server tricky Interview Questions?

Image
1.Problem:-  Note:- bellow script related to MS SQL server I have three tables data bellow.  create table plch_by_car ( Name varchar ( 20 )) Go create table plch_by_Bus ( Name varchar ( 20 )) Go create table plch_on_foot ( Name varchar ( 20 )) Go insert into plch_by_car values ( 'Abraham chatterley' ) insert into plch_by_car values ( 'Benjamin delaney' ) insert into plch_by_car values ( 'charles esterey' ) Go insert into plch_by_Bus values( 'Abraham chatterley' ) insert into plch_by_Bus values( 'Benjamin delaney' ) insert into plch_by_Bus values( 'David fautle' ) Go insert into plch_on_foot values( 'Abraham chatterley' ) insert into plch_on_foot values( 'charles Esterey' ) insert into plch_on_foot values( 'Evender Gilderoy' ) Problem statement :- use  set Operators to sallow this problem (Union, Union all, intersect ,Except).  comment -...