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-…
How to write an SQL statement that gets a row if the rest of the rows with the same userID are not a certain condition?
Given the following table: userId | State | Number ——————————– 123 | waiting | 3 123 | processing | 2 123 | completed | 1 How can I get the row …
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 …
Fulltext search on partial word (like “prefix%”)
To search for a full word in a mysql fts search I can do: select * from pdxa where match(_search ) against (‘everywhere’) is there a way to just search for the start of a word, such as: select * …
Failed to convert from a String to a TimeSpan error
I am attempting to post to my Database using a SqlCommand like so queryLogResults.Parameters.Add(“@executionTime”, SqlDbType.Time).Value = executionTime; This is the string I am passing in as …
“ORA-00998: must name this expression with a column alias” i am having this error can anyone tell me what’s the problem and its solution
this is my sample code;- Answer Imagine writing a query for your new view. Your column names – are you asking for a column called SUM(purch_amt), or are you trying to do a sum on a column called purch_amt? You need to provide a valid column name for the view, either implicitly or explicitly. Adding an alias allows the database