How can I get the reports by campaign and with date - google-ads-api

I am getting the reports from the Adwords API. The formate is CampaignID, AdgroupID, Impressions, Clicks, Date.
I want to get the reports for only one campaign and the reports records should be ordered with date.
At least is there a way to get the reports for a particular campaign only.

You can pass the campaign id as a predicate (a filter) to get data from just one campaign.

Related

Get list of transactions by date range in Authorize.net

I have been trying to get the list of transactions by date range but couldn't find any API related to Authorize.net
I found transaction list.
Is there any way to get a list by date range or any other custom parameters (except transaction_id)?
Use getSettledBatchListRequest to get the batch IDs for the date range you wish to get a list of transactions for. Then call getTransactionListRequest in a loop and get the transactions for each batch.

Adwords API - How to exclude NULL values from an Adwords report using AWQL

I am trying to download a SHOPPING_PERFORMANCE_REPORT with the following fields:
OfferId
ProductTitle
Brand
Date
Impressions
For a small subset of records I'm getting empty/blank data for OfferId, ProductTitle, and Brand (only Date and Impressions are not null). I want to exclude NULL OfferId and the filter: WHERE OfferID != '' doesn't seem to make any difference. How do I exclude NULL values from my report query??
I ran a similar report for one of our larger shopping accounts, and did not experience the behavior that you describe. So I can't really say how the filtering on those fields is supposed to work.
One thought, though: Is there a possibility that you have a fast-changing inventory and the records that have empty fields refer to products that are no longer in your shopping feed in Merchant Center?
To be honest, I'm not sure if that would cause OfferId etc. to be empty, but it would be a potential explanation.

Basic AWQL request - CAMPAING_PERFORMANCE split by "date" only

I face strange behavior on my Adwords API response, which brakes a logic of our reports.
Here is my AWQL:
SELECT Date,Ctr FROM CAMPAIGN_PERFORMANCE_REPORT DURING 20181206, 20181206
Response:
Report Day,CTR
2018-12-06,0.00%
2018-12-06,3.23%
Why do I get 2 rows of results, it should be only one (same date). I asked only for one date. Same thing with a different range of dates.
It feels to me like Adwords splits the results by CampaignIds.
It is possible to get "total" result, split by date?
CAMPAIGN_PERFOMANCE_REPORT is segmented by campaign. If you want Ctr by date across an account you need to use ACCOUNT_PERFORMANCE_REPORT instead

Rails: select records with maximum date

In my app users can save sales reports for given dates. What I want to do now is to query the database and select only the latest sales reports (all those reports that have the maximum date in my table).
I know how to sort all reports by date and to select the one with the highest date - however I don't know how to retrieve multiple reports with the highest date.
How can I achieve that? I'm using Postgres.
Something like this?
SalesReport.where(date: SalesReport.maximum('date'))
EDIT: Just to bring visibility to #muistooshort's comment below, you can reduce the two queries to a single query (with a subselect), using the following form:
SalesReport.where(date: SalesReport.select('MAX(date)'))
If there is a lot of latency between your web host and your database host, this could halve execution times. It is almost always the preferred form.
You can get the maximum date to search for matching reports:
max_date = Report.maximum('date')
reports = Report.where(date: max_date)

Crystal Reports X CurrentDate in empty field

I am trying to create a Crystal Report that will show the Average days to pay for a customer. But if the customer hasn't paid, then i want the report to assume that the customer paid today. The trouble i am having is my data returns the unpaid stuff as blank. how and where can i put a formula that will put the Current Date (Date report is run) in the empty Date field?
When Unpaid stuff is blank then display current date using the If formula

Resources