Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. 23 maj 2011 · SQL Query To Obtain Value that Occurs more than once. I need to query my database to show the records inside my table where lastname occurs more than three times. Example: in my Students Table, there are 3 people with Lastname 'Smith', 4 with 'Johnson', and 1 with 'Potter'.

  2. 8 wrz 2016 · I have a table that has multiple rows with the following fields: PersonName SongName Status. I want to use names selected from a multiple selection listbox, which I can retrieve the values, and then do a where clause so it shows the song names that the selected people can all play, therefore status is complete. For example:

  3. 19 lip 2018 · How I can select all row where account_id occurs more than once? For the example above it will return rows 1, 2, 4, 5. I tried this one query, but it does not return what I expect: select * from table_name t1 where (select count(*) from table_name t2 where t1.account_id = t2.account_id) > 1 order by t1.account_id;

  4. 6 dni temu · 3.1. In the SELECT Clause. First, we’ll take a look at an example with the Student and Exam tables, in which we’ll retrieve each student’s name and the number of exams they’ve taken: SELECT s.name, (SELECT COUNT (*) FROM Exam e WHERE e.student_id = s.id) AS exam_count FROM Student s;

  5. 28 lut 2023 · If a table has duplicate rows, you can find them with SQL. Use a query with a GROUP BY clause including all the columns in the table and a HAVING clause to filter rows that appear more than one time. Here’s an example:

  6. 8 wrz 2021 · rn = ROW_NUMBER() OVER (PARTITION BY login_name ORDER BY login_time DESC) To: rn = ROW_NUMBER() OVER (PARTITION BY login_name ORDER BY login_time)

  7. 17 sty 2015 · LOOK AT THE QUESTION AGAIN. Write a SQL query to find all numbers that appear at least three times consecutively. From the output in your question, 2 does not occur three times consecutively. I have an iterative solution using user-defined variables.

  1. Ludzie szukają również