Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3601814
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:40:06+00:00 2026-05-18T20:40:06+00:00

What i am trying to do is a simple recommender , must take the

  • 0

What i am trying to do is a simple recommender , must take the biggest weighted top 40 element’s node2 element. Calculation for weight comes from (E.WEIGHT * K.GRADE). Now this code succesfully returns top 40 elements. However, i don’t want E.NODE2 to return duplicates. POSTGRE SQL allowed me to do SELECT DISTINCT ON (NODE2) E.NODE2 , (E.WEIGHT * K.GRADE). How can i do the same in oracle?

The complete sql query;

SELECT *
 FROM   (SELECT DISTINCT E.NODE2  , (E.WEIGHT * K.GRADE)
    FROM KUAISFAST K, EDGES E
    WHERE K.ID = 1 AND K.COURSE_ID = E.NODE1 AND E.NODE2 NOT IN(
        SELECT K2.COURSE_ID
        FROM KUAISFAST K2
        WHERE K2.ID = 1
        ) 
    ORDER BY( E.WEIGHT * K.GRADE ) DESC) TEMP
WHERE rownum <= 40
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T20:40:06+00:00Added an answer on May 18, 2026 at 8:40 pm

    This should solve your problem, altough quite slow

    SELECT * FROM
    (SELECT *
     FROM   (SELECT E.NODE2 ,  max(E.WEIGHT * K.GRADE ) AS MAXDE
        FROM KUAISFAST K, EDGES E
        WHERE K.ID = 1 AND K.COURSE_ID = E.NODE1 AND E.NODE2 NOT IN(
            SELECT K2.COURSE_ID
            FROM KUAISFAST K2
            WHERE K2.ID = 1
            ) 
            GROUP BY E.NODE2 )
    ORDER BY MAXDE DESC)
    WHERE rownum <= 40
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What i am trying to do is a simple recommender , must take the
I am trying this simple tutorial from oracle : http://www.oracle.com/technetwork/java/socket-140484.html (the Example 1 ).
I am trying to run a simple hadoop job , hadoop jar /root/ravi/ConvertDataWithHadoopOne.jar com.mdotm.recommender.ConvertDataWithHadoopOne
I am trying to run the following PCL simple viewer example from http://pointclouds.org/documentation/tutorials/pcl_visualizer.php I
Hey folks - I'm writing a pretty simple iPhone application. The data comes from
I am learning and trying simple example using node.js and mongoskin. here is my
After trying this simple console input with 5, the result is shown as 53
I am trying a simple Extension Method example and am unable to increment or
Hi I am trying out simple rollover images for a site I am currently
i am enthusiast and new in programming trying this simple c language code and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.