Skip to content

Tag: mysql

Operand Should Contain 1 Column(s), Trying to generate volunteer data

I can’t seem to troubleshoot my problem. My stored procedure: Additionally, here is my volunteer table in my MYSQL script: I am trying to insert 500 lines into this table, however error 1305 is coming up. Any help is heavily appreciated, I am quite unsure of where to go from this point. Answer This logi…

Select all the last dates from all list of id

I’m trying to select all the videos that were last inserted, without repeating any ID_video_type (id_video_tipo column). Here’s an example of the data int the database: I’m trying to run the following query but when I do that I get the following result As you can see, I managed to get the vi…

Find all users with a unique last name

I have a table users. I wrote a sql query that displays all users with a unique last name tell my why query removes collapsed users name2 and name3? HAVING COUNT(DISTINCT u.first_name) = 1; How it works? help to understand how it works Answer The query is aggregating by last name and counting the number of us…

Creating entity for database

For example, I have database with table book (id, title, themeId, authorId), table author (id, name) and table theme (id, name). I dont know, should i create entity exactly like in database (and then i will have problems with join queries): or create something like this: in second case i will have problems if…

How do I delete specific entries wherein there are duplicate entries

Sorry I’m just using this account from my old friend, he said he wanted it to have higher reputation. lol I have a table that looks like this and I want to delete the entries wherein the next duplicate ones based from the first_name, middle_name, and last_name, and alias columns. While keeping the first…