sql stringlengths 6 1.05M |
|---|
<gh_stars>10-100
-- file:triggers.sql ln:1372 expect:true
delete from parted_stmt_trig
|
<filename>tests/root/strip_urls/02/test.sql<gh_stars>100-1000
SELECT
strip_urls('The quick http://t.co.il brown fox') = 'The quick brown fox'
;
|
DECLARE @FileName NVARCHAR(250)
select @FileName = REPLACE(c.column_value, '.xel', '*.xel')
from sys.dm_xe_sessions s
JOIN sys.dm_xe_session_object_columns c
ON s.address =c.event_session_address
WHERE column_name = 'filename'
AND s.name = 'system_health'
SELECT
CAST (event_data AS XML).value('(event/@timestamp)[... |
-- ======================================
-- GPI - <NAME>
-- Database Resident Connection Pooling (DRCP)
-- =======================================
-- Master Note: Overview of Database Resident Connection Pooling (DRCP) (Doc ID 1501987.1)
-- =======================================
set linesize 130 pagesize 300
column... |
create or replace view v_inv_lot as
select b.object_rrn,b.org_rrn,b.is_active,b.created,b.created_by,b.updated,b.updated_by,b.lock_version,b.material_id,e.lot_id,c.doc_id,c.date_created,b.qty_movement from inv_movement_line b,inv_movement c,inv_movement_line_lot d,wip_lot e
where b.movement_rrn=c.object_rrn
and c.doc_s... |
<filename>source/data/tables.sql<gh_stars>1-10
DROP TABLE IF EXISTS admin_notes;
CREATE TABLE admin_notes ("id" bigint, "parent_type" CHARACTER VARYING(max), "parent_id" bigint, "source" CHARACTER VARYING(max), "user_id" bigint, "body" CHARACTER VARYING(max), "created_at" timestamp without time zone, "updated_at" times... |
create table tab_partition_range_range
(
col1 number(15) not null,
col2 number(15) not null,
col3 number(15) not null,
col4 number(15) not null
)
partition by range (col1,col2)
subpartition by range (col3,col4)
(
partition part_10_5 values less than (10,5)
(
subpartition part_10_5__3_4 values less tha... |
-------------------------------------------------------------------------------
--
-- PLEASE NOTE
--
-- No warranty, no liability, no support.
--
-- This script is 100% at your own risk to use.
--
-------------------------------------------------------------------------------
undefine sid
undefine sql_id
set termout ... |
<gh_stars>0
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50710
Source Host : localhost
Source Database : graduation
Target Server Type : MySQL
Target Server Version : 50710
File Encoding : utf-8
Date: 02/... |
<filename>sentinel.sql
-- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 05, 2018 at 11:02 AM
-- Server version: 5.6.24
-- PHP Version: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
<reponame>SukhatankarSV/MindUnwind
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 26, 2018 at 05:38 AM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 5.6.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_... |
<gh_stars>0
\COPY Users(email, firstname, lastname, password, addr, balance) FROM 'data/Users.csv' WITH DELIMITER ',' NULL '' CSV
\COPY Category FROM 'data/Categories.csv' WITH DELIMITER ',' NULL '' CSV
\COPY Product FROM 'data/Products.csv' WITH DELIMITER ',' NULL '' CSV
\COPY SellerReview FROM 'data/Seller_Reviews.cs... |
INSERT INTO `project` (`title`,`abstract`,`poster`,`video`,`project_id`,`module_code`,`iteration`) VALUES ("BB3218 Project 1","Lorem ipsum dolor sit amet,","nec quam.","nec, diam.",1200,"BB3218",6),("BB3218 Project 2","Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur sed tortor. Integer aliquam adipi... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 12, 2018 at 03:21 PM
-- Server version: 10.1.24-MariaDB
-- PHP Version: 7.1.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
SELECT
ITN.*,
TLI.TAXON_LIST_ITEM_KEY,
TXG.TAXON_GROUP_NAME
FROM
TAXON_GROUP AS TXG
INNER JOIN
TAXON_VERSION AS TXV ON
TXG.TAXON_GROUP_KEY = TXV.OUTPUT_GROUP_KEY
INNER JOIN
TAXON_LIST_ITEM AS TLI ON
TXV.TAXON_VERSION_KEY = TLI.TAXON_VERSION_KEY
INNER JOIN
INDEX_TAXON_NAME AS ITN ON
TLI... |
DELETE FROM OrderParts
WHERE OrderId = 19
DELETE FROM Orders
WHERE OrderId = 19 |
SELECT
I.*
FROM FULLTEXT_INDEXES I
WHERE 1=1
/*if isNotEmpty(schemaName)*/
AND I.SCHEMA_NAME IN /*schemaName;type=NVARCHAR*/('%')
/*end*/
/*if isNotEmpty(tableName)*/
AND I.TABLE_NAME IN /*tableName;type=NVARCHAR*/('%')
/*end*/
/*if isNotEmpty(indexName)*/
AND I.INDEX_NAME IN /*indexName;type=NVARCHAR*... |
/*************************************************************************************
* Create views for exercise table
*************************************************************************************/
BEGIN;
/* Cleanup */
DROP VIEW IF EXISTS get_exercise CASCADE;
DROP VIEW IF EXISTS get_full_ex... |
<filename>tags/20081129_v0.1.3/data/database/scripts/inserts_countries.sql
INSERT INTO PF_CONFEDERATIONS (X_CONFEDERATION,S_CONFEDERATION,S_LOGO) VALUES (1,'Europe','ue_logo.png');
INSERT INTO PF_CONFEDERATIONS (X_CONFEDERATION,S_CONFEDERATION,S_LOGO) VALUES (2,'South America','sa_logo.png');
INSERT INTO PF_CONFEDERATI... |
CREATE TABLE IF NOT EXISTS boards (
id INTEGER PRIMARY KEY AUTOINCREMENT,
board_string TEXT NOT NULL
);
CREATE TABLE IF NOT EXISTS board_rows (
id INTEGER PRIMARY KEY
);
CREATE TABLE IF NOT EXISTS board_columns (
id INTEGER PRIMARY KEY
);
CREATE TABLE IF NOT EXISTS board_blocks (
id INTEGER PRIMARY KEY
);
... |
<reponame>baatochan/BasicsOfDBManagementCourse
select last_name, first_name
from employees
where salary --not
between 2000 and 10000 --zakres
--order by last_name ASC, first_name DESC
order by 1 ASC, 2 DESC |
create database mqtt;
use mqtt;
CREATE TABLE `mqtt_user` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(100) DEFAULT NULL,
`password` varchar(100) DEFAULT NULL,
`salt` varchar(35) DEFAULT NULL,
`is_superuser` tinyint(1) DEFAULT 0,
`created` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
... |
<filename>Microsoft.Sample.Automation/DispatchEngineService/Entities/DispatchEngineDataModel.edmx.sql<gh_stars>0
-- --------------------------------------------------
-- Entity Designer DDL Script for SQL Server 2005, 2008, and Azure
-- --------------------------------------------------
-- Date Created: 12/02/2013 14:... |
/* Q5. Most active posters in a given topic
\set tag '\'Abbas_I_of_Persia\''
*/
WITH detail AS (
SELECT CreatorPerson.id AS CreatorPersonId
, count(DISTINCT Comment.Id) AS replyCount
, count(DISTINCT Person_likes_Message.MessageId||' '||Person_likes_Message.PersonId) AS likeCount
, count(DISTINCT Messa... |
create or replace view v_system_report_control_tag_no_test as
select
a1.tenant_record_id
, a1.name as tag_name
, count(distinct(a1.account_id)) as count
from analytics_account_tags a1
left outer join analytics_account_tags a2
on a1.account_id = a2.account_id and a2.name = 'TEST'
where 1=1
and a2.record_id IS NULL
and... |
<gh_stars>10-100
CREATE TABLE task_board
(
id bigint NOT NULL,
parent_unit_id bigint NOT NULL,
CONSTRAINT task_board_pkey primary key (id),
CONSTRAINT task_board_parent_unit_fkey FOREIGN KEY (parent_unit_id)
REFERENCES okr_department (id)
ON UPDATE NO ACTION ON DELETE NO ACTION
);
CREAT... |
ALTER TABLE suggestions
ADD COLUMN applied_hunks TEXT[]; |
ALTER TABLE
IF EXISTS lsif_dirty_repositories DROP COLUMN IF EXISTS set_dirty_at;
|
<filename>db_brawijaya.sql
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 26 Mei 2016 pada 02.21
-- Versi Server: 10.1.13-MariaDB
-- PHP Version: 5.6.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... |
<gh_stars>1-10
-- MySQL dump 10.13 Distrib 5.7.25, for Linux (x86_64)
--
-- Host: localhost Database: library
-- ------------------------------------------------------
-- Server version 5.7.25-0ubuntu0.16.04.2
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS... |
-- @testpoint:参数列表中仅出现参数值,参数值的排列顺序和函数定义时一致
drop FUNCTION if EXISTS func_add_sql017;
CREATE FUNCTION func_add_sql017(num1 integer, num2 char) RETURN char
AS
BEGIN
RETURN (num1,num2);
END;
/
--调用函数,参数按顺序传递,调用成功
CALL func_add_sql017(999,'hello');
drop FUNCTION func_add_sql017; |
USE employment_DB;
INSERT INTO all_employee_data(name, employee_id, first_name, last_name, title, salary, role_id, manager_id)
VALUES
("Engineering", 1, "Peyton", "Holmes", "Lead Engineer", 150000, 2, null),
("Engineering", 2, "Jonathan", "Doerety", "Software Engineer", 125000, 2, 1),
("Sales", 3, "Sally",... |
DELETE FROM study_items
WHERE id = ? |
<reponame>IEEE-VIT/recruitment2020-backend<filename>pre.sql
INSERT INTO public."Slots" (suid, "roundNo", "auid", date, "timeFrom", "timeTo", count, "gdpLink", "createdAt", "updatedAt") VALUES (3, '2', null, '2020-12-27', '21:00:00', '23:00:00', 0, null, '2020-12-11 08:29:33.908390', '2020-12-11 08:29:33.908390');
INSER... |
<filename>database/prestamos.sql
/*
Navicat MySQL Data Transfer
Source Server : Localhost Laragon
Source Server Version : 50719
Source Host : localhost:3306
Source Database : prestamos
Target Server Type : MYSQL
Target Server Version : 50719
File Encoding : 65001
Date: 2017-10-12 1... |
<filename>server/test/seeds.sql
/*Passwords -> 1: enter, 2: trainer*/
INSERT INTO users (username, password_digest)
VALUES
('bob', <PASSWORD>'),
('gary', <PASSWORD>');
INSERT INTO habits (habit, weekly_track, daily_track, user_id)
VALUES
('drink water', 7, 5, 1),
('drink water', 7, 5, 2),
('exerci... |
-- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 21 Jan 2018 pada 04.37
-- Versi Server: 5.6.24
-- PHP Version: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!4... |
/*
2) Consider Following table. Write a procedure which accepts Date and Depth as parameter and returns the expiring contract.
Depth = ordering of tickers sorted by LastTrade
ContractCode Ticker LastTrade
ES ESU0 9/15/2020
ESZ0 12/15/2020
ESH1 3/15/2021
ESM1 6/15/2021
ESU1 9/15/2021
NK NK1 9/15/2020
NK2 10/15/2020... |
DROP DATABASE IF EXISTS employee_db;
CREATE DATABASE employee_db;
USE employee_db;
---- WILL CREATE DEPARTMENT TABLE ----
CREATE TABLE departments(
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR (30) NOT NULL,
PRIMARY KEY(id)
);
---- WILL CREATE ROLE TABLE ----
CREATE TABLE roles(
id INT NOT NULL AUTO... |
CREATE OR ALTER PROCEDURE dbo.prc_Perf_AggressiveLockingIndexes
AS
BEGIN
/*
** This proc returns the TOP aggressive indexes on all the databases for the current server.
The filters are:
1. More than 1000 page_lock_wait_count or row_lock_wait_count
2. More than 5 minutes of total row_lock + page_lock
3. DISTINC... |
<gh_stars>1-10
DROP TABLE IF EXISTS `programs`;
CREATE TABLE `programs` (
`id` bigint(20) NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_active` tinyint(1) DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`legacy_id` int(11) DEFAULT NULL,
`l... |
<gh_stars>1-10
prompt --application/shared_components/logic/application_items/application_context
begin
-- Manifest
-- APPLICATION ITEM: APPLICATION_CONTEXT
-- Manifest End
wwv_flow_api.component_begin (
p_version_yyyy_mm_dd=>'2020.10.01'
,p_release=>'20.2.0.00.20'
,p_default_workspace_id=>2601326064169245
,p_... |
select deptno
, ename
, hiredate
, listagg(ename, ',') within group (order by hiredate) over (partition by deptno) as employees
from emp |
<filename>src/test/resources/wal2.test_26.sql
-- wal2.test
--
-- execsql {
-- Pragma Locking_Mode = Exclusive;
-- Pragma Journal_Mode = Wal;
-- Pragma Lock_Status;
-- }
Pragma Locking_Mode = Exclusive;
Pragma Journal_Mode = Wal;
Pragma Lock_Status; |
<gh_stars>10-100
-- file:updatable_views.sql ln:550 expect:true
CREATE VIEW rw_view1 AS
SELECT ctid, sin(a) s, a, cos(a) c
FROM base_tbl
WHERE a != 0
ORDER BY abs(a)
|
<reponame>jblowe/services
CREATE OR REPLACE FUNCTION utils.findvoucherinfo(text)
RETURNS text
LANGUAGE sql
IMMUTABLE STRICT
AS $function$
select
array_to_string(array_agg(concat_ws(', ', regexp_replace(lc.borrower, '^.*\)''(.*)''$', '\1'), to_char(lc.loanoutdate, 'YYYY-MM-DD'))), '|') as voucherinfo
from relation... |
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this ... |
<reponame>AndiFreund/twu-biblioteca-andreasfreund
/* task 1 */
SELECT member.name
FROM member, checkout_item, book
WHERE member.id = checkout_item.member_id
AND book.id = checkout_item.book_id
AND book.title = 'The Hobbit';
/* task 2 */
SELECT COUNT(*)
FROM
(SELECT member.id
FROM member
EXCEPT
SELECT member.id
FR... |
<gh_stars>0
-- SET SQL_SAFE_UPDATES = 0;
-- SELECT * FROM album.tb_photo;
-- DELETE FROM album.tb_photo WHERE username = 'user01';
-- alter table tb_userInfo drop column id;
|
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table communication (
id bigint not null,
home_phone varchar(255),
mobile_phone varchar(255),
work_phone varchar(255),
... |
<gh_stars>10-100
create index if not exists idx1 on table1 (funk_shun(c1, c2))
|
-- Create test database
CREATE DATABASE testdb;
-- Create client user
CREATE USER "postgres-user" WITH ENCRYPTED PASSWORD '<PASSWORD>';
-- Grant privileges to postgres-user
GRANT ALL PRIVILEGES ON DATABASE testdb TO "postgres-user";
|
<reponame>mqadri/outsourcer
CREATE OR REPLACE FUNCTION os.fn_update_status(p_queue_id int, p_status text, p_queue_date timestamp, p_start_date timestamp, p_error_message text,
p_num_rows int, p_id int, p_refresh_type text, p_target_schema_name text, p_target_table_name text,
p_target_append_only boolean... |
-- @testpoint:opengauss关键字transaction(非保留),作为用户组名
--关键字不带引号-成功
drop group if exists transaction;
create group transaction with password '<PASSWORD>';
drop group transaction;
--关键字带双引号-成功
drop group if exists "transaction";
create group "transaction" with password '<PASSWORD>';
drop group "transaction";
--关键字带单引号-合... |
CREATE TABLE session (
sid varchar NOT NULL PRIMARY KEY,
sess json NOT NULL,
expire timestamp(6) NOT NULL
) WITH (OIDS=FALSE);
CREATE TYPE user_type AS ENUM ('user', 'admin');
CREATE TABLE users (
id bigserial PRIMARY KEY,
username varchar(255) UNIQUE,
password varchar(100),
salt text,
type user_type DEFAULT ... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 05-12-2021 a las 06:45:08
-- Versión del servidor: 10.4.17-MariaDB
-- Versión de PHP: 7.4.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<reponame>juanfv2/base-cms
CREATE OR REPLACE PROCEDURE sp_has_permission(
INOUT aggregate integer,
_urlBackEnd character varying
)
LANGUAGE plpgsql
as $$
begin
aggregate = (SELECT count(*) FROM auth_users
INNER JOIN auth_users_has_roles ON auth_users_has_roles.user_id = auth_users.id
INNER JOIN ... |
CREATE TABLE IF NOT EXISTS example_test_table_2(); |
<filename>SQL/2_alter_DDLs.sql
SELECT max(char_length(code)) FROM public.station_metadata;
UPDATE station_metadata SET latitude = REPLACE(latitude, ',', '.');
UPDATE station_metadata SET longitude = REPLACE(longitude, ',', '.');
ALTER TABLE station_metadata
ALTER COLUMN code SET DATA TYPE varchar(30),
ALTER COLUMN in... |
<reponame>jdilger/collect-earth-online<gh_stars>0
CREATE INDEX projects_institution_rid ON projects (institution_rid);
CREATE INDEX project_imagery_project_rid ON project_imagery (project_rid);
CREATE INDEX ext_samples_plot_rid ON ext_samples (plot_rid);
CREATE INDEX plot_assignments_plot_rid ON plot_assign... |
<gh_stars>0
INSERT INTO public.boards (name, description, uri, banner, hidden) VALUES ('Хаос'::character varying, 'Анархия - мать порядка!'::character varying, 'b'::character varying, 'b.png'::character varying, false::boolean)
returning id;
INSERT INTO public.boards (name, description, uri, banner, hidden, signer) VA... |
DELETE FROM AccountsTrips
WHERE AccountId = 47
DELETE FROM Accounts
WHERE Id = 47 |
<filename>SQL Configuration/function_getDifferenceTimestamps.sql
create or replace FUNCTION getDifferenceTimestamps(datahoraInicio in TIMESTAMP, datahoraFim in TIMESTAMP)
return NUMBER as resultado NUMBER(10,0);
begin
select extract( day from diff )*24*60*60*1000 +
extract( hour from diff )*60*60*1000 +
... |
USE devops_ci_dispatch;
SET NAMES utf8mb4;
CREATE TABLE IF NOT EXISTS `T_DISPATCH_PIPELINE_DOCKER_TASK_SIMPLE` (
`ID` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`PIPELINE_ID` varchar(64) NOT NULL DEFAULT '' COMMENT '流水线ID',
`VM_SEQ` varchar(64) NOT NULL DEFAULT '' COMMENT '构建机序号',
`DOCKER_IP` va... |
<reponame>adrieledgard/PHS
delimiter //
create trigger trgreceiveheader after update on receive_header
for each row
begin
declare done int(2);
declare done2 int(2);
declare Var_No_receive varchar(20);
declare Var_tgl date;
declare Var_Id_product int(11);
declare Var_Id_variation int(11);
declare Var_Expir... |
<filename>src/main/resources/db/migration/V00001__Create_tg_user_Table.sql
DROP TABLE IF EXISTS tg_user;
CREATE TABLE tg_user
(
chat_id BIGINT PRIMARY KEY,
name VARCHAR(50),
active BOOLEAN
);
|
<filename>Server/htdocs/AppController/commands_RSM/updater/server/phpUpdate_From_v6.3.0.3.150_to_v6.3.1.3.151/update_post.sql
# Insert the application version with changes in the PHP layer
INSERT INTO rs_dbchanges (RS_ID, RS_PREVIOUS_VERSION, RS_NEW_VERSION, RS_EXECUTION_DATE, RS_COMMENTS)
VALUES (NULL, '6.3.0.3.150', ... |
<filename>offers-service/src/main/resources/sql/schema.sql
DROP TABLE IF EXISTS offer;
CREATE TABLE offer (ID BIGINT GENERATED BY DEFAULT AS IDENTITY (START WITH 1), product_id BIGINT, shop_id BIGINT, shop_name VARCHAR(255), price INT, PRIMARY KEY (id));
|
copy (
select
player_name as name,
tr.year as year,
tr.class_year as class,
team_name as team,
framing::numeric(4,3)
from ncaa_pbp._framing f
join ncaa_pbp.team_rosters tr
on (tr.ncaa_id)=(f.catcher_id)
where division_id in (1,2,3)
order by player_name,team,tr.year
) to '/tmp/framing_alpha.csv' csv header;
|
<filename>src/Dfc.CourseDirectory.Database/Pttcd/Tables/Providers.sql<gh_stars>1-10
CREATE TABLE [Pttcd].[Providers]
(
[ProviderId] UNIQUEIDENTIFIER NOT NULL CONSTRAINT PK_Providers PRIMARY KEY,
[LastSyncedFromCosmos] DATETIME,
[Version] ROWVERSION NOT NULL,
[ApprenticeshipQAStatus] TINYINT,
[Ukprn] INT,
[Provid... |
IF object_id('EventStoreEvents', 'U') IS NOT NULL
BEGIN
DROP TABLE [EventStoreEvents];
END
IF EXISTS(
SELECT *
FROM sys.table_types tt JOIN sys.schemas s ON tt.schema_id = s.schema_id
WHERE tt.name='NewEventStoreEvents')
BEGIN
DROP TYPE NewEventStoreEvents;
END
IF object_id('EventStoreSnapshots', 'U')... |
<gh_stars>0
-- Retrieve the name of all unique Badges obtained by the
-- user with ID 3 awarded after 2011, together with the
-- first date after 2011 in which that user obtained that badge.
-- Order the results by increasing Badge Name.
-- 1.1 marks: <6 operators
-- 1.0 marks: <7 operators
-- 0.8 marks: correct answer... |
<reponame>RouissiAnouer/HTSensor
select ID_capteur, Description
from capteur
order by ID_capteur asc
limit ?,? |
--
-- Database query file
-- For uninstallation
--
-- @package ReReplacer
-- @version 2.13.0
--
-- @author <NAME> <<EMAIL>>
-- @link http://www.nonumber.nl
-- @copyright Copyright (C) 2010 NoNumber! All Rights Reserved
-- @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
--
DELETE FRO... |
-- run query 1 in stream 0 using template query38.tpl and seed 1819994127
<<<<<<< HEAD
select count(*) from (
select distinct c_last_name, c_first_name, d_date
from store_sales, date_dim, customer
where store_sales.ss_sold_date_sk = date_dim.d_date_sk
and store_sales.ss_customer_sk = customer.c... |
<reponame>bzjiaozi/basemall
----------------------------- shops -----------------------------
CREATE TABLE `t_account_center` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
... |
CREATE EXTENSION IF NOT EXISTS citext;
CREATE TABLE IF NOT EXISTS table_with_id (
id integer NOT NULL,
name text NOT NULL,
null_name text,
ci_name citext NOT NULL,
created_at timestamp without time zone DEFAULT now() NOT NULL,
truthiness bool NOT NULL
);
CREATE TABLE IF NOT EXISTS table_with_string_id (
... |
-- params: table-name
PRAGMA index_list(`~a`)
|
SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event is NOT NULL;
pid | wait_event_type | wait_event
------+-----------------+------------
2540 | Lock | relation
6644 | LWLock | ProcArray
(2 rows)
|
USE [TogglesDataBase]
GO
CREATE TABLE [dbo].[Toggles](
[Id] [uniqueidentifier] NOT NULL,
[CodeName] [nvarchar](64) NOT NULL,
[Description] [nvarchar](256) NULL,
CONSTRAINT [PK_Toggles] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = O... |
<gh_stars>0
CREATE PROCEDURE [AFEDive].[GET_DRILL_TIME_SUMMARY_FOR_OFFSET_WELLS]
@API10 VARCHAR(10)
AS
SELECT DTS.[API10]
,DTS.DEPTH
,(DTS.CUM_WELL_DURATION)/24 as CUM_WELL_DURATION
FROM [AFEDive].[DRILL_BEST_OFFSET] DBF
LEFT JOIN [AFEDive].[DRILL_WELL_OFFSET] DWO ON DWO.OFFSET_ID = DBF.OFFSET_ID
LEFT JOIN [... |
// get a movies cast and directors order by cast
match (a:Person)-[:ACTED_IN]->(m:Movie),
(p:Person)-[:PRODUCED]->(m)
with m, collect(distinct a.name) as cast, collect(distinct p.name) as producers
return m.title, producers, cast order by size(cast) desc;
// get an actors list of movies
match (actor:Person)-[:ACTED_IN... |
<reponame>bnuzbroadcast/bnuzbroadcast--7-15finish<filename>t_bnuzbroadcast.sql
/*
Navicat MySQL Data Transfer
Source Server : bnuzbroadcast
Source Server Version : 50547
Source Host : localhost:3306
Source Database : t_bnuzbroadcast
Target Server Type : MYSQL
Target Server Version : 50547
F... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 04, 2018 at 12:38 PM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
REM StudentOps2.sql
REM Chapter 10, Oracle9i PL/SQL Programming by <NAME>
REM This version of StudentOps does not have the RESTRICT_REFERENCES
REM pragma.
CREATE OR REPLACE PACKAGE StudentOps AS
FUNCTION FullName(p_StudentID IN students.ID%TYPE)
RETURN VARCHAR2;
/* Returns the number of History majors. */
... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 07, 2021 at 01:22 PM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... |
CREATE TABLE user (
userName VARCHAR(100) NOT NULL,
nickname VARCHAR(100) NOT NULL,
password VARCHAR(100) NOT NULL,
PRIMARY KEY(userName)
);
CREATE TABLE post(
postId INT(30) NOT NULL AUTO_INCREMENT,
userName VARCHAR(100),
topic VARCHAR(100) NOT NULL,
FORE... |
SELECT * FROM mysql.db WHERE User = '#{username}';
SELECT id, data_value FROM data_values;
SELECT User, Db, Host FROM mysql.db WHERE Lock_tables_priv='Y'
select count(*) from mysql.user where Host='localhost' and User=''
SELECT COUNT(*) FROM information_schema.SCHEMATA WHERE schema_name='#{db_name}'
SELECT * FROM mysql... |
<gh_stars>100-1000
ALTER INDEX distributors RENAME TO suppliers;
ALTER INDEX distributors SET TABLESPACE fasttablespace;
ALTER INDEX distributors SET (fillfactor = 75);
ALTER INDEX coord_idx ALTER COLUMN 3 SET STATISTICS 1000;
ALTER INDEX IF EXISTS foo ATTACH PARTITION bar;
ALTER INDEX foo NO DEPENDS ON EXTENSION ... |
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 22, 2020 at 03:16 AM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
-- executed by spring boot on H2 DB at test and application start time
CREATE TABLE IF NOT EXISTS PUBLISHERS (
ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY
,NAME VARCHAR(255) NOT NULL CONSTRAINT PUBLISHERS_NAME_UC UNIQUE
,PHONE VARCHAR(30)
);
CREATE TABLE IF NOT EXIS... |
set search_path to version;
drop function if exists refreshVersionRecommendations(varchar(255), varchar(255));
reset search_path;
|
<filename>src/main/resources/db/migration/V4.29__add_in_user_id_for_parse_user_table.sql<gh_stars>1-10
ALTER TABLE ptcore.parse_user ADD COLUMN in_user_id BIGINT NOT NULL DEFAULT 0;
|
<reponame>rlktradewright/tradebuild-platform<gh_stars>1-10
USE [Trading]
GO
/****** Object: Table [dbo].[Exchange] Script Date: 06/19/2014 22:53:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Exchange](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Name] [char](20) N... |
<reponame>Shuttl-Tech/antlr_psql
-- file:macaddr.sql ln:21 expect:true
INSERT INTO macaddr_data VALUES (14, '08:00:2a:01:02:04')
|
INSERT INTO items (entry, class, subclass, field4, name1, displayid, quality, flags, buyprice, sellprice, inventorytype, allowableclass, allowablerace, itemlevel, requiredlevel, RequiredSkill, RequiredSkillRank, RequiredSpell, RequiredPlayerRank1, RequiredPlayerRank2, RequiredFaction, RequiredFactionStanding, `Unique`,... |
CREATE EXTENSION fuzzystrmatch;
select hash
from curartdata
WHERE soundex(hash) = soundex('5555F10B150AAB64803653BA453181152B4EEB9D3963F72CB50E8EFD773958C8FEDC86');
|
with line_items as (
select *
from {{ var('purchase_order_line_item') }}
), purchase_orders as (
select *
from {{ var('purchase_order') }}
), accounts as (
select *
from {{ var('account') }}
), contacts as (
select *
from {{ var('contact') }}
), joined as (
select
li... |
alter table YETDEMO_SUBSCRIPTION add constraint FK_YETDEMO_SUBSCRIPTION_CUSTOMER foreign key (CUSTOMER_ID) references YETDEMO_CUSTOMER(ID);
create index IDX_YETDEMO_SUBSCRIPTION_CUSTOMER on YETDEMO_SUBSCRIPTION (CUSTOMER_ID);
|
CREATE TABLE JOB_INSTANCE_STATUS (
JOB_INSTANCE_ID BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
PROCESS_INSTANCE_ID BIGINT DEFAULT NULL,
PROCESS_INSTANCE_NAME VARCHAR(255) DEFAULT NULL,
JOB_NAME VARCHAR(255) NOT NULL,
JOB_PROJECT varchar(128),
JOB_DISPLAY_NAME VARCHAR(255) DEFAULT NULL,
JOB_GUID VARCHAR(100) ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.