Skip to content
Advertisement

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 entry or the ones who have

mySQL: Select rows if text column contains an item on a blacklist

I am trying to create a query that can select all posts from my database that contain a blacklisted tag unless the post contains a whitelisted tag. Tags are stored in a text column (i.e., ” tag1 tag2 tag3 “). Take for example this pseudo code: Is it possible to generate a query using the contents of whitelist and blacklist

Split date range into weeks in sql

Given a table called Project, I need the list of team_id’s who won at least an award every week in last 3 months launch_date team_id project_name 2019-01-01 123 A 2019-01-01 345 B 2019-…

Update column with value from two potential columns

I have 3 different columns for phone numbers that I need to fix in my table. My goal is to replace phone (if empty or null) with the value of either phone2 or phone 3. I don’t care which one as long …

Delete repeated data in Bigquery

I am optimizing a query in Bigquery that shows non-repeated data, currently it is like this and it works. select * from (select ROW_NUMBER() OVER (PARTITION BY id) as num, id, …

Oracle SQL Errors

I am very new to SQL and my class is using Oracle cloud as of now. I have created tables and I am trying to insert data into it. I keep receiving the error ORA-02291: integrity constraint violated …

Advertisement