Count total number of pages globally - confluence

We are preparing for an upgrade of confluence. We are documenting all the current information about our confluence instance before we do the upgrade.
I need to know how many Total pages there are globally within confluence.
From the administrators console I can see this information
Content (All Versions) 91892
Content (Current Versions) 18194
It is my understanding that this information is total content, including blog posts, attachments, comments etc... Not specifically Page Count
I have found some macros that will tell me how many pages exist in a particular space, but that does not quite do what I need as we have over 200 spaces currently.
The database we have this on is: Microsoft SQL Server.
Confluence Version: 3.4.2
Is there any way to get the total number of pages within confluence globally?
Any help would be greatly appreciated.

Yes, the system information page lists the total count of ALL content elements.
If you want to know the figures by content type you could query the database with the following SQL:
ALL
SELECT contenttype, count(*) FROM content c GROUP BY c.contenttype
Current Versions
SELECT contenttype, count(*) FROM content c WHERE c.prevver is null GROUP BY c.contenttype

Related

Crystal Reports Filtering and Organizing data

I am writing a small Crystal Report using 2 tables (TICKET,HISTORY,CUSTOMER) from a database I was given access to. I do not have access to modify the database tables to correct the issue and I am looking to see if this is possible.
The TICKET table is my main table and has a 1 to Many relation to HISTORY table.
The CUSTOMER table has 1 to Many relation to the TICKET table.
Inside the HISTORY table, there is column called Version. Every time a HISTORY entry is added on a TICKET, the Version number is written into this field, ie 21.4, 19.7, etc.
Ideally, the version would be better suited attached to the CUSTOMER table once the entry was added into the HISTORY table, but that change has not been made.
What I am trying to do with my report is group and display my results as follows:
Version Number
Customer Name
I can get this far, but the issue I am running into is, I only want to show the customer on their latest version number and suppress all previous records so I can get an accurate count of how many and which customers are on each version. Is this possible to do?
If you are allowed to create a VIEW in the database, create one that joins Ticket to History, groups on Ticket ID, and returns the Ticket ID and the Max of the Version.
In Crystal, you can then simply joint to that View.

Crystal Reports Parameters - One List rather than pages

All,
My first ever post - here goes!
I am using a Dynamic Parameter to filter a report based on Purchase Order Number.
I have created the Parameter, but only so many results are on the list, then you have to change to page 2 and start looking through again, is there anyway to get all values on a single list.
I have am awaiting my IT Department to do the Registry edit to increase the search size, as I have well over 1,000 records.
Finally, I assume the user couldn't search for a relevant value in the list?
I am using Crystal Reports 2011 64 Bit Version
Any help would be great.

Tableau Include Latest Revision (Publish) Date in Dashboard

I have a dashboard I am developing in 2018.2.3 Desktop that will eventually get published to our internal Tableau Web Portal. I am writing a "Help" tab that has some documentation, directions, etc. for users to view in case they are curious what report is for, how to use it, definitions, etc..
One piece that I want to include at the header of this are three dates:
Report Created
Report Data Refresh
Report Publish Date
The first two are simple, the "Report Created" is just text, since I have no idea how to get the date the report was actually started. Text is fine for this. The Data Refresh is simple as using the, "". That works perfectly.
My only issue is I'd like to include the most recent publish date / revision. Now, I see this in the Tableau Web as meta data on the dashboard, but I'd like it to be part of this "Help" page. Is there a way to do this with some sort of dimension or variable? Thanks in advance.
If you are on Server and not Online, you can take a look at getting this data from the WORKGROUP database that Tableau Server runs from. Use this guide from Tableau to get that setup.
Then you will want to look at the workbook, sites and workbook_versions tables. Here is a sample query that could help.
select s.name site, w.name workbook, wv.version_number, wv.published_at, w.updated_at
from workbooks w
left join sites s on w.site_id = s.id
left join workbook_versions wv on w.id = wv.workbook_id
where upper(w.name) like '%<WORKBOOK>%'
group by 1,2,3,4,5
having w.updated_at = max(w.updated_at)
published_at is a timestamp of the initial publish.
updated_at is the last date it was updated.
version_number is a count of how many times the workbook has been published to on that site.
Here is a data dictionary for all the other available tables.
You can pull this query as a new data source and build the text that you want to display.

Get click count and impressions from lineitemid in Google Admanager (DFP)

I have a line item id stored in my DB, and i want using Admanager API to get click count, impressions number in PHP.
I saw on google groups that it was possible to do it using report generation and then parsing, but there is a faster way to do it (if possible i don't want to make a full report of my campaign)
thank you
This is an example of a Google Ad Manager query where you can get impressions and clicks for a particular order ID (which you can then change for line item ID in order to filter just for it). You can then download the results of that query as a CSV file, and process them as you'd process any CSV file.

How to measure language popularity via Github Archive data?

I'm attempting to measure programming language popularity via:
The number of stars on repos in combination with...
The programming languages used in the repo and...
The total bytes of code in each language (recognizing that some languages are more/less verbose)
Conveniently, there is a massive trove of Github data provided by Github Archive, and hosted by BigQuery. The only problem is that I don't see "language" available in any of the payloads for the various event types in Github Archive.
Here's the BigQuery query I've been running trying to find if, and where, language may be populated in the Github Archive data:
SELECT *
FROM [githubarchive:month.201612]
WHERE JSON_EXTRACT(payload, "$.repository.language") is null
LIMIT 100
Can someone please provide insight into whether I'll be able to utilize Github Archive data in this way, and how I can go about doing so? Or will I need to pursue some other approach? I see that there is also a github_repos public dataset on BigQuery, and it does have some language metrics, but the languages metrics seem to be over all time. I'd prefer to get some sort of monthly metric eventually (i.e., of "active" repos in a given month, what were the most popular languages).
Any advice is appreciated!
With BigQuery and GitHub Archive and GHTorrent -
To get the languages by pull requests, last December (copy pasted from http://mads-hartmann.com/2015/02/05/github-archive.html):
SELECT COUNT(*) c, JSON_EXTRACT_SCALAR(payload, '$.pull_request.base.repo.language') lang
FROM [githubarchive:month.201612]
WHERE JSON_EXTRACT_SCALAR(payload, '$.pull_request.base.repo.language') IS NOT NULL
GROUP BY 2
ORDER BY 1 DESC
LIMIT 10
To find the number of stars per project:
SELECT COUNT(*) c, repo.name
FROM [githubarchive:month.201612]
WHERE type='WatchEvent'
GROUP BY 2
ORDER BY 1 DESC
LIMIT 10
For a quick language vs bytes view, you can use GHTorrent:
SELECT language, SUM(bytes) bytes
FROM [ghtorrent-bq:ght.project_languages]
GROUP BY 1
ORDER BY 2 DESC
LIMIT 10
Or to look at the actual files, see the contents of GitHub on BigQuery.
Now you can mix these queries to get the results you want!
SELECT
JSON_EXTRACT_SCALAR(payload, '$.pull_request.head.repo.language') AS language,
COUNT(1) AS usage
FROM [githubarchive:month.201601]
GROUP BY language
HAVING NOT language IS NULL
ORDER BY usage DESC