SQL duplicate records
select EMPID ,Forminfoid,FormName ,count(*) as dcount
from tbl_FilesMigrationLogs
group by EMPID,Forminfoid,FormName
HAving COUNT(*) >1
track by multiple columns.
SQL duplicate records
select EMPID ,Forminfoid,FormName ,count(*) as dcount
from tbl_FilesMigrationLogs
group by EMPID,Forminfoid,FormName
HAving COUNT(*) >1
track by multiple columns.
azure blob name spaces issue getting filename has different characters so getting error that
path not found.
2.don't use increment id as save for the other table
3.use country code instad of name may be name will changes
1.string saparations. query
select STRING_AGG(EmpID,',') From
(
SELECT EmpID FROM tbl_Employee ORDER BY updatedOn DESC
OFFSET 70 ROWS FETCH NEXT 20 ROWS ONLY
) AS S;
2.in one table you need to get order by for 2 columns
ex:workflowid inorder after that sequence in desc order
for this user
SELECT WorkFlow_ID, User_ID, MAX(Approver_Sequence) AS MaxApproverSequence
FROM tbl_WorkFlowMembers
WHERE Division_ID='RAIL'
GROUP BY WorkFlow_ID, User_ID
ORDER BY WorkFlow_ID, MaxApproverSequence DESC;
Check duplicate count based on 3 columns combo
select EMPID,FORMinfoID,FormName,Count(*) as counts from tbl_FilesMigrationLogs
group by EmpID,FormInfoID,FormName
HAVING COUNT(*) >1;
Find the difference between the total number of CITY entries in the table and the number of distinct CITY entries in the table. The STATION table is described as follows
To find the difference between the total number of CITY entries and the number of distinct CITY entries in the STATION table, you can use the following SQL query:
SELECT
COUNT(CITY) AS TotalCityCount,
COUNT(DISTINCT CITY) AS DistinctCityCount,
(COUNT(CITY) - COUNT(DISTINCT CITY)) AS CityCountDifference
FROM STATION;Query a list of CITY names from STATION for cities that have an even ID number. Print the results in any order, but exclude duplicates from the answer.
The STATION table is described as follows:
In C#, memory is managed using different types of memory allocation and regions. Here are the primary memory types you will encounter:
int, float, bool, structs, etc.) and local variables.csharpvoid Method()
{
int x = 10; // 'x' is stored in stack memory
}
Purpose: Stores reference types (objects, arrays, strings, etc.) and instances of classes.
Managed by: The garbage collector (GC) automatically cleans up unused objects.
Characteristics:
Example:
csharpclass Person
{
public string Name;
}
void Method()
{
Person person = new Person(); // 'person' is allocated on the heap
person.Name = "John";
}
Purpose: Stores static variables and global data (variables defined with the static keyword).
Managed by: The runtime and remains available throughout the application’s lifetime.
Characteristics:
Example:
csharpclass MyClass
{
public static int counter = 0; // Static variable
}
void Method()
{
MyClass.counter++; // Access static variable
}
Garbage Collection (GC): C# uses a garbage collector to manage memory on the heap, freeing memory of objects that are no longer in use (i.e., no references to them exist).
Memory Allocation:
new and deallocated by the GC when no references exist.Memory Leaks:
Let me know if you'd like a deeper dive into garbage collection or memory management strategies in C#! 🚀
Position Overview: We are a growing start up seeking a Junior Azure DevOps Engineer with 2 to 3 years of experience to support our Azure...