Select most recent record per day based on 3 columns I have a table that looks like this:
CREATE TABLE tbl_AppUsage(
ID int IDENTITY(1,1) NOT NULL,
UserName nchar(250) NULL,
UPN nchar(250) NULL,
AppDisplayName nchar(250) NULL,
AppId nchar(250) NULL,
CreatedDateTime nchar(250) NULL);

INSERT INTO tbl_AppUsage (UserName, UPN, AppDisplayName, AppId, CreatedDateTime)
VALUES
    ('aaa', 'aaa@mail.com', 'Adobe DC', '1234fdr234', '07/10/2020 08:39:14'),
    ('aaa', 'aaa@mail.com', 'Adobe DC', '1234fdr234', '07/10/2020 08:51:14'),
    ('aaa', 'aaa@mail.com', 'Adobe DC', '1234fdr234', '07/10/2020 09:39:14'),
    ('aaa', 'aaa@mail.com', 'Adobe DC', '1234fdr234', '07/11/2020 09:39:14'),
    ('bbb', 'bbb@mail.com', 'Adobe DC', '1234fdr234', '07/10/2020 08:39:14'),
    ('bbb', 'bbb@mail.com', 'Adobe DC', '1234fdr234', '07/10/2020 09:39:14'),
    ('bbb', 'bbb@mail.com', 'Adobe DC', '1234fdr234', '07/11/2020 10:39:14'),
    ('bbb', 'bbb@mail.com', 'Adobe DC', '1234fdr234', '07/11/2020 10:51:14')
;

I want to create a query that returns the newest record per day per user

I tried with the following:
SELECT 
       ID
      ,UserName
      ,UPN
      ,AppDisplayName
      ,AppId
      ,CreatedDateTime
  FROM tbl_AppUsage T1
  WHERE CreatedDateTime=(
  SELECT MAX(CreatedDateTime)
  FROM tbl_AppUsage
  WHERE UserName = T1.UserName AND AppId = T1.AppId)
  GROUP BY UserName

No success and I am a bit stuck, to be honest.
The table that I will query has 200 000 plus records and I am using MS SQL 2017 as DBMS.
I am unsure whats the best method to get the data with performance in mind.
Note: I know that the columns (like CreatedDateTme) can be other types but in this case, it has to be a nchar.
One way to accomplish this, is to use ROW_NUMBER
because you need on record  per day per user, I added in the PARTITION: a.UserName, CAST(CreatedDateTime as DATE)
 and for the newest record , I added ORDER BY CAST(CreatedDateTime as DATETIME) DESC
SELECT
    src.ID ,
    src.UserName,
    src.UPN,
    src.AppDisplayName,
    src.AppId,
    src.CreatedDateTime
FROM
(
    SELECT
        ID ,
        UserName,
        UPN,
        AppDisplayName,
        AppId,
        CreatedDateTime,
        ROW_NUMBER()OVER(PARTITION BY a.UserName, CAST(CreatedDateTime as DATE) ORDER BY CAST(CreatedDateTime as DATETIME) DESC)as rn
    FROM dbo.tbl_AppUsage as a
)as src
WHERE
    src.rn = 1

output:
ID          UserName    UPN              AppDisplayName  AppId         CreatedDateTime
----------- ----------- ---------------- --------------- ------------- -------------------
3           aaa         aaa@mail.com     Adobe DC        1234fdr234    07/10/2020 09:39:14
4           aaa         aaa@mail.com     Adobe DC        1234fdr234    07/11/2020 09:39:14
6           bbb         bbb@mail.com     Adobe DC        1234fdr234    07/10/2020 09:39:14
8           bbb         bbb@mail.com     Adobe DC        1234fdr234    07/11/2020 10:51:14

Base on your query, same output
SELECT 
       ID
      ,UserName
      ,UPN
      ,AppDisplayName
      ,AppId
      ,CreatedDateTime
  FROM tbl_AppUsage as T1
  WHERE CreatedDateTime=(
      SELECT MAX(CreatedDateTime)
      FROM tbl_AppUsage as T2
      WHERE T2.UserName = T1.UserName 
        --AND AppId = T1.AppId  
        AND CAST(T1.CreatedDateTime AS DATE) =CAST(T2.CreatedDateTime AS DATE)
    )
  --GROUP BY UserName