Skip to content

Tag: sql

c# ef core RemoveRange contraint violation

Hi I have a complex db with many tables and relations what we want to do is to copy all tables from a database to another but only taking rows starting from one table (salesorder) and going down following relations. So I avoided the .Include, and use IQueryable queries (one for each table) there is no problem…

How to combine these two SELECT statment into one

I have two SELECT query which are written in MySQL AND So far I have to translate these two query to Oracle PL/SQL‚I came in idea to combine these two statment into one and so far I write query but I am a little bit confusing since I am begginer in PL/SQL Here is graphical representation of tables CategoryTab…

Group by + sum for different thresholds (preferably in a single query)

Let’s say I have a table with 3 columns: Column A: Client_ID (not unique, can appear in multiple rows) Column B: Price paid for a product Column C: Product (type) I want to get 6 columns: i.e With Client_ID x Product unique I think the first part can be achieved with a simple GROUP BY However, how can I…