Advanced Search for answers posted to your questions

0

Please login or register to vote for this query.

(click on this box to dismiss)

This allows you to search all the answers posted to your questions or to the questions of any other user (you will need their UserId).

Joomla

Q&A for Joomla! administrators, users, developers and designers

/*
Use Search Parameters as follows :

- SearchTerm : Enter terms that you want to search for. Only limitation is that an exact search is performed so be careful when searching for multiple terms in a single query.  

NOTE :: If you do not want to search for a specific term, then fill this field a '%', without quotes 

- MinScore : The minimum score of the posts that you would like to search in.
- MaxScore : The maximum score of the posts that you would like to search in.
- IsAccepted : Set this to 1 when searching for only *accepted answers* to your questions. When searching for all answers, set it to 0 (default value).
- QuestionTags : This is an optional field. Leave it as is, if you do not need it. Otherwise, add search tags into this field. Again, since an exact match is performed, be careful of order and case when searching for multiple tags.
- SelfAnswer : Set this to 1 when searching for *your answers* to your questions. When searching for all answers, set it to 0 (default value).
*/
with c as (
SELECT
        'site://a/' +  CAST(P1.Id AS nvarchar) + '|' + P2.Title as 'Post Link', 
        P1.Score as AnswerScore,
        P2.Score as QuestionScore
       
FROM Posts as P1, Posts as P2
WHERE P2.Id = P1.ParentId and --Join of Questions with Answers--
      P2.PostTypeId = 1 and -- P2 Contains Questions --
      P1.PostTypeId = 2  -- P1 contains Answers --
      AND P2.OwnerUserID = P1.OwnerUserID

      
      
      )
      SELECT AVG(CAST(QuestionScore AS FLOAT)) FROM C

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results