We can remove the duplicate rows from any table using distinct function.We have to apply distinct function to the column in which we find the duplicate values while joining with other table. Try it your self below example and let me know.. Create tables as below and insert values...
INSERT INTO Dept VALUES (10,'Sales','Hyd') INSERT INTO Dept VALUES (20,'Acct','KCG'); INSERT INTO Dept VALUES (30,'Mang','SBC'); INSERT INTO Dept VALUES (40,'Admin','MAS');
Select * from dept
INSERT INTO EMP VALUES ('SK',1,10,300); INSERT INTO EMP VALUES ('JJ',2,20,300); INSERT INTO EMP VALUES ('JJ',2,20,300); INSERT INTO EMP VALUES ('RS',3,30,300); INSERT INTO EMP VALUES ('AA',4,40,300); INSERT INTO EMP VALUES ('AA',4,40,300);
Select * from EMP
Observe that we have 2 duplicate rows in Emp table
Removing duplicates while data retrieval:
Select Distrinct EmpName,DeptId,Sal from emp;
Removing duplicates while joining with other table:
select distinct E.Empname,d.deptid,d.deptname,d.loc,e.sal from dept d left join emp e on D.DEPTID = e.DEPTID
Please let me know this solution helped you..
Happy to help.. Giridhar
My requrement is Join concept( in ACCENTURE) i have a 2 Tables one is emp and second is dept in emp has duplicate records and dept has unique records in this case how to join the emp & dept table? req solu(clue): i think crate a caluculated field on emp- get a unique valus after join the table.
plz if u any answer send me detail explanation.
Given below are some challenging tasks in my view..
Most challenging would be understanding the requirement and visualizing the data. Without visualizing you can not create any Dashboards in tableau.
Working on Data Extracts and reducing the query retrieval time.
Working on Customer Mapping Dashboard with custom Geocoding.
Understanding the complex SQL and creating DataModels in .tds.
5.Converting the other reporting object/reports to Tableau.I mean building the Tableau report from scratch using pre/old reports created from other reporting tools (Cognos,OBIEE,SSRS,Hyperion etc..).
Hope this will help you..
Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!