Home > database >  For an efficient SQL statement!
For an efficient SQL statement!

Time:09-25


Demand has a similar to zhihu q&a, themes and reply at the same table

Id (themes/reply id) pid theme (0) subject (title) content (content) the summary (summary) likee (thumb up)


I want to query subject list under the theme of this paper is the maximum number of thumb up reply, below:





CodePudding user response:

Still don't quite understand your meaning,
The building Lord give some simulation data, and then gives the desired results,

CodePudding user response:

Table, it is best to build the simulation data, and then given to the results of the query, words sometimes less straightforward

CodePudding user response:

Sort, take the first,
  • Related