Disclaimer

Wednesday 21 July 2021

Skewed Data

You can have a column named GENDER with two possible values MALE or FEMALE; which is not skewed.

you can have a column named INVOICE_STATUS with two possible values of OPEN or CLOSED; which is skewed since most invoices are CLOSED 

.

SQL> create table emp (ename varchar2(50), esex varchar2(10));


Table created.


SQL> insert into emp select object_name,'Male' from dba_objects;


9369 rows created.


SQL> commit;


Commit complete.


SQL> insert into emp select object_name,'Female' from dba_objects where rownum < 20;


19 rows created.


SQL> commit;


Commit complete.


SQL> select esex,count(*) from emp group by esex;


ESEX         COUNT(*)
---------- ----------
Female             19
Male             9369

No comments:

Post a Comment

100 Oracle DBA Interview Questions and Answers

  Here are 100 tricky interview questions tailored for a Senior Oracle DBA role. These questions span a wide range of topics, including perf...