How to choose the following data using sql?

Hi people,

I use oracle 10g.i have two tables as follows.

PROGRAMMER
PNAME                          DOB       DOJ       SEX   PROF1                          PROF2                             SALARY
------------------------------ --------- --------- ----- ------------------------------ ------------
ALIAF                          02-JUL-64 02-JUL-90 M     CLIPPER                        COBOL                               2800
JULIANA                        31-JAN-68 31-JAN-60 F     COBOL                          DBASE                               3000
KAMALA                         30-OCT-68 30-OCT-92 F     C                              DBASE                               2900
MARY                           24-JUN-78 24-JUN-91 F     C++                            ORACLE                              4500
NELSON                         11-SEP-65 11-SEP-89 M     COBOL                          DBASE                               2500
PARTICK                        10-NOV-65 10-NOV-90 M     PASCAL                         CLIPPER                             2800
QADIR                          31-AUG-65 31-AUG-91 M     ASSEMBLY                       C                                   3000
RAMESH                         03-MAR-67 03-MAR-91 M     PASCAL                         DBASE                               3200
REBECCA                        01-JAN-67 01-JAN-90 F     BASIC                          COBOL                               2500
REMITHA                        02-DEC-69 02-DEC-92 F     PASCAL                         BASIC                               3600
REVATHI                        02-DEC-69 02-DEC-92 F     PASCAL                         BASIC                               3700
VIJAYA                         14-DEC-65 14-DEC-92 F     FOXPRO                         C                                   3500
ANAND                          21-APR-66 21-APR-92 M     PASCAL                         BASIC                               3200
SOFTWARE
PNAME                          TITLE                          DEV_IN                   DCOST     SCOST      SOLD
------------------------------ ------------------------------ -------------------- --------- -------
ANAND                          PHARACHUTES                    BASIC                     6000       400        43
ANAND                          VIDEO TITLLING PACK            PASCAL                   16000      7500         9
JULIANA                        INVENTORY CONTROL              COBOL                     3500      3000         0
KAMALA                         PAYROLL PACKAGE                DBASE                    20000      9000         7
MARY                           FINANCIAL ACCOUNT              ORACLE                   85000     18000         4
MARY                           CODE GENERATOR                 C                        20000      4500        23
PARTICK                        READ ME                        C++                        900      2000        84
QADIR                          BOMBAS AWAY                    ASSEMBLY                  5000       750        11
QADIR                          VACCINES                       C                         3400      1900        21
RAMESH                         HOTEL MANAGEMENT               DBASE                    35000     12000         4
RAMESH                         DEAD LEE                       PASCAL                    4500       600        73
REMITHA                        PC UTILITIES                   C                         5000       725        51
REMITHA                        TRS HELP PACKAGE               ASSEMBLY                  6000      2500         6
REVATHI                        HOSPITAL MANAGEMENT            PASCAL                   75000      1100         2
REVATHI                        QUIZ MASTER                    BASIC                     2100      3200        15
Now the task is to display the details of the software that has been developed in the language which is neither the first nor the second jurisdiction of the programmer.can u pls help me solve it.thanks in advance.


Reg
vids

Now the task is I have to display the details of the software that has been developed in the language which is neither the first nor the second skill of the programmer

SELECT s.*
FROM   software s,
       programmer p
WHERE  s.pname = p.pname
       AND s.dev_in NOT IN ( p.prof1, p.prof2 );  

Tags: Database

Similar Questions

  • How to choose the last rate in SQL?

    Dear friends,

    I have a table named pr_master

    There are the item_id, pr_date, and item_rate fields in the table

    data are as below

    item_id pr_date item_rate

    21 01/01/2014 50

    21 01/05/2014 45

    01/09/2014 21, 44

    01/05/2014 25, 115

    15/01/2014 25, 110

    17/01/2014 25, 125

    I want the maximum date through SQL for specific item rate.

    Any1 can help. Thanking you.

    Kind regards

    with

    pr_master as

    (select 21 item_id, to_date('01-01-2014','dd-mm-yyyy') pr_date, 50 item_rate union double all the)

    Select 21, to_date (May 1, 2014 "," dd-mm-yyyy ""), 45 union double all the

    Select 21, to_date (September 1, 2014 "," dd-mm-yyyy ""), 44 Union double all the

    Select 25, to_date (May 1, 2014 "," dd-mm-yyyy ""), 115 union double all the

    Select 25, to_date (15 January 2014 "," dd-mm-yyyy ""), 110 union double all the

    Select 25, to_date (January 17, 2014 "," dd-mm-yyyy ""), 125 of the double

    )

    Select item_id, pr_date, item_rate

    of (item_id, pr_date, item_rate, row_number (select) on rn (partition by item_id arrested by pr_date desc)

    of pr_master

    )

    where rn = 1

    ITEM_ID PR_DATE ITEM_RATE
    21 09/01/2014 44
    25 17/01/2014 125

    Concerning

    Etbin

  • How to get the full DDL using SQL developer

    Hi all

    I need get the full DDL a table with the details of the index partitions, synonyms, comments (if any) and give information if given any role, use SQL developer. We can achieve the same thing using shortcut F4 on name of the table into a frog, then selecting tab DDL. Is it possible to get the same in SQL Developer also?


    Also how I see existing procedures using SQL developer?  A toad, we were able to achieve using the schema browser.

    Hi all

    I reached by - right click on connection - diagram open... and any browser will even...

  • How to view clob data using sql

    Hello

    In our database we have a table that is to have a column of type CLOB but now I want to display the data using sql select query but it throws error: "unsupported data Type.

    Could someone let me know how to view the clob data using the select query.

    Oracle DB version: 10.2.0.3

    Thank you

    user562223 wrote:
    Hello

    In our database we have a table that is to have a column of type CLOB but now I want to display the data using sql select query but it throws error: "unsupported data Type.

    Could someone let me know how to view the clob data using the select query.

    Oracle DB version: 10.2.0.3

    Thank you

    Usually a to_char (CLOBDFIELD) circled

    HTH,

    FJFranken

  • To change the way of afficherdans the data using SQL

    I have data as follows:

    Name age
    Tom 24
    Harry 45
    Mona 30


    I want to convert these data in the way below

    Name1, name2 Age1 Age2 Name3 3
    24 45 30 Mona Harry Tom



    How can I do the same thing using SQL?

    Why not try to search this forum of 'PIVOT' to make this small change yourself?

    SQL> set line 1000
    SQL> WITH t AS (SELECT 101 empid,45 marks,8 rank FROM dual UNION ALL
      2             SELECT 101 empid,62 marks,7 FROM dual UNION ALL
      3             SELECT 101 empid,80 marks,2 FROM dual UNION ALL
      4             SELECT 102 empid,67 marks,5 FROM dual UNION ALL
      5             SELECT 102 empid,56 marks,6 FROM dual UNION ALL
      6             SELECT 103 empid,87 marks,7 FROM dual UNION ALL
      7             SELECT 103 empid,55 marks,9 FROM dual UNION ALL
      8             SELECT 103 empid,60 marks,6 FROM dual UNION ALL
      9             SELECT 103 empid,70 marks,3 FROM dual
     10             )
     11  ---End of Sample Data
     12  ---Now the original query.
     13  SELECT empid, MAX(DECODE(rn1,1,marks)) Marks1,MAX(DECODE(rn1,1,rank)) Rank1
     14              , MAX(DECODE(rn1,2,marks)) Marks2,MAX(DECODE(rn1,2,rank)) Rank2
     15              , MAX(DECODE(rn1,3,marks)) Marks3,MAX(DECODE(rn1,3,rank)) Rank3
     16              , MAX(DECODE(rn1,4,marks)) Marks4,MAX(DECODE(rn1,4,rank)) Rank4
     17  FROM
     18     (SELECT empid,marks,rank,
     19      ROW_NUMBER() OVER(PARTITION BY empid ORDER BY marks) rn1
     20      FROM t)
     21  GROUP BY empid;
    
         EMPID     MARKS1      RANK1     MARKS2      RANK2     MARKS3      RANK3     MARKS4      RANK4
    ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
           101         45          8         62          7         80          2
           102         56          6         67          5
           103         55          9         60          6         70          3         87          7
    
    SQL> 
    
  • How to choose the display by default when you use two screens on my Mac Pro?

    How to choose the display by default when you use two screens on my Mac Pro?

    The default view when you have several is made that you drag the little icon in the menu bar in this pane:

    .

  • How to find the dense rank for the following data?

    I would like to know the dense rank of the following data:

    Table1:

    emp_id, emp_name salary

    1 name1 5000

    2 6000 name2

    3 name3 7000

    4 name4 8000

    I would like the classification of employees as below:

    Rank

    Name4 1

    Name3 2

    name2 3

    Name1 4

    Any body justify this request?

    Well, for every dense grade use DENSE_RANK :-) http://docs.Oracle.com/CD/E11882_01/OLAP.112/e23381/olap_functions004.htm

    WITH table1 AS(
    SELECT 1 emp_id, 'name1' emp_name, 5000 salary FROM dual UNION ALL
    SELECT 2 emp_id, 'name2' emp_name, 6000 salary FROM dual UNION ALL
    SELECT 3 emp_id, 'name3' emp_name, 7000 salary FROM dual UNION ALL
    SELECT 4 emp_id, 'name4' emp_name, 8000 salary FROM dual
    )
    SELECT  emp_name
           ,DENSE_RANK() OVER (ORDER BY salary DESC) "Rank"
    FROM    table1;
    

    Concerning

    Marcus

  • How to choose the value of a string are numeric together and words of letters (for example, TEST)

    Hi all

    How to choose the value of a string are letters (for example, TEST) and all numeric...

    for example
    TEST 123456
    TEST 34567
    123456 ABCD
    1234 TEST
    TESTING 12345
    TEST 1@234$
    YOUR T 123456

    I want the results of the query as below.
    TEST 123456
    TEST 34567

    And I tried to use regexp_like in this case but without success. See the code below.
    SELECT * FROM TABLE WHERE regexp_like (Description, ' [TEST] % & [[: digit:]] + $');

    How can I do this, please answer.

    Thank you

    WF

    If you want to return only the rows that contain the string 'TEST', followed by zero or more space characters, followed by one or more digits?

    How about this:

    SELECT *.

    FROM my_table

    WHERE REGEXP_LIKE(description,'^TEST\s*\d+$')

  • How to solve the problem of Oracle SQL Developer Connection?

    People,

    Hello. I use the Oracle 11 GR 1 material database. The database https://localhost.localdomain:1158 control console / em works correctly. I can create a database and a table with success.

    My OS is Linux and connects to the internet successfully.

    In order to execute SQL statements. We use Oracle SQL Developer. I connect Oracle SQL Developer in the following way:

    Connection name: DB1 (is my database name)
    User name: SYS (this is the user name I used to connect to the Console)
    Password: SYS (this is the password used to connect to the Console)
    Connection type: basic
    Host name: localhost
    Port: 1158
    SID: DB1 (it is created during the installation of the database)

    But the error message: "status: failed - IO exception Connection Reset."

    Can any folk tell me how to solve the problem of Oracle SQL Developer Connection?

    user8860348 wrote:
    People,

    Hello. I use the Oracle 11 GR 1 material database. database Control Panel https://localhost.localdomain:1158 / em works correctly. I can create a database and a table with success.

    My OS is Linux and connects to the internet successfully.

    In order to execute SQL statements. We use Oracle SQL Developer. I connect Oracle SQL Developer in the following way:

    Connection name: DB1 (is my database name)
    User name: SYS (this is the user name I used to connect to the Console)
    Password: SYS (this is the password used to connect to the Console)
    Connection type: basic
    Host name: localhost
    Port: 1158
    SID: DB1 (it is created during the installation of the database)

    But the error message: "status: failed - IO exception Connection Reset."

    Can any folk tell me how to solve the problem of Oracle SQL Developer Connection?

    user name: sys
    password: enter_your_correct_password given at the time of the installation of oracle

    role: select sysdba if you would connect as sysdba otherwise select normal for users other than the sys

    HostName: Enter your ip or hostname of the oracle example server address:-192.168.11.12

    to find the terminal/command prompt open hostname in oracle installed machine
    type---> hostname

    type ping hostname--->

    You can find the IP address of the server

    Port number: 1521 (default)---> I guess, otherwise check the port number in the file tnsnames.ora under your ORACLE_HOME/network/admin folder

    SID: DB1

    try it
    Good luck

  • How to avoid the SEPARATE in OBIEE SQL

    Hello...

    For the issue I posted previously...
    Problem with the data type LONG in responses

    I executed the query into a FROG, and I've identified the error because of what this error is coming... because of SEPARATE...
    I took care to avoid this column in ORDER BY putting order on another column...

    Now my question is how to avoid the DISTINCT clause in SQL generated by OBIEE...
    If the first column of criteria is then it avoids the SEPARATE... but if I use measure... Group of will come... and group of should not be used here...

    If it's done... my problem is solved...
    Of course... I get duplicate rows...

    However, I want the answer how avoid SEPARATE?
    Waiting for the response from your...

    Thanks and greetings
    Kishore Guggilla

    Kishore,

    In the physical layer, open the properties of physical catalog and in the features tab find DISTINCT_SUPPORTED and remove the check box value.

    who removed separate in each query generated for this database.

    -Madan

  • HP pavilion 15-e034tx: how to choose the right RAM for laptop

    How to choose the right RAM for my laptop (Pavilion 15-e034tx). I know I should buy DDR3 ram.

    Are there other factors should I consider when buying one? I got 2 slots for ram, which od these combos are possible?

    1-4 + 4 GB
    2-4 GB + 8 GB
    3-8 GB + 8 GB

    Thank you

    From the Manual:

    Two customer accessible/upgradable memory module slots

    Support for dual channel DDR3L (1600 MHz)

    Support 8192 MB RAM system in the following configurations:

    8192 MB (8192 MB × 1, × 4096 MB 2)

    Manual download link

    See page 53 for instructions. Memory access is easy via the service Panel. This is the part number for the approved 4 HP concert module:

    4 GB (PC3L, 12800, 1600 MHz) 691740-001

    http://www.Amazon.com/HP-691740-001-4GB-1600MHz-PC3L-12800/DP/B00CI08FX4/ref=sr_1_2?ie=UTF8 & qid = 1451655870 & SR = 8-2 & Keywords = 691740-001

    A 8 GB module is listed in the manual, and it's a 3rd generation of processor i5 I suspect 2 x 8 = 16 concerts would work, but strictly following the manual your only option is to add a 4 GB for a total of 8. Most users really not more 8 GB and adding a second identical module will allow two-channel operation, so you should see a noticeable jump in the overall performance.

    If it's 'the Answer' please click on 'Accept as Solution' to help others find it.

  • How to create the user account using the command?

    How to create the user account using the command?

    Open cmd as administrator, and then type the following commands one after the other

    NET user / add program mypassword
    net localgroup administrators program / add
    net share concfg * C:------/ grant: program, complete
    This will create a user account with the name "Program" and the password "MonMotpasse".

    You can create the user name and password of your choice.
  • How to get the last date of 3 days for the current month?

    Hello. Guy

    How to get the last date of 3 days for the current month?

    MY OUTPUT WOULD LOOK LIKE THIS

    JANUARY 29, 2016

    JANUARY 30, 2016

    JANUARY 31, 2016


    GUYS HELP ME / / /...

    SQL > select last_day (sysdate) - level + 1 double connect by level<= 3="" order="" by="">

    LAST_DAY)

    ---------

    29 JANUARY 16

    30 JANUARY 16

    31 JANUARY 16

  • BI Layout Editor - how to display the current date?

    Hello

    Recently used BI Layout Editor (previously using MS Word to create the presentation of the State).

    He seems really nice and easy to use.

    However quick Q - How to display the current date in the layout editor (to show the report run date).

    Any quick suggestions is appreciated.

    Thank you

    Vivek

    Tab displays your selection available.

    It's like how when you insert the table in the Word document and when you select the table, you would see 2 additional tabs such as the design and the tool.

    Can you please insert "Text Element" and select the text element and see if you go to the tab 'text '?

  • How to choose the max value

    Hi all

    I have the following data

    Pat_id Pat_enc_csn_id Dept_id Admit_date

    Z269466457982980405500116/05/2014 13:21
    Z0062455957760008205505008/05/2014 14:37
    Z0062455957760008205507608/05/2014-21:06

    My requirement is to get the max dept or the date of maximum admission for each patient. my output should therefore

    Pat_id Pat_enc_csn_id Dept_id Admit_date

    Z269466457982980405500116/05/2014 13:21
    Z0062455957760008205507608/05/2014-21:06

    can someone help me with the code please. using 11 g.

    (Note: there are several number of patients not only 2)

    Thank you.

    with t as)

    Select p,

    ROW_NUMBER() over (partition by Pat_id of Admit_date desc order) rn

    from your_table p

    )

    Select Pat_id,

    Pat_enc_csn_id,

    Dept_id,

    Admit_date

    t

    where rn = 1

    /

    SY.

Maybe you are looking for